fix(torrent): remove torrent h&r warning only when status value from true to false

This commit is contained in:
OldHawk
2017-09-08 13:41:48 +08:00
parent 953e98ecd4
commit 738bb0be15

View File

@@ -506,7 +506,8 @@ exports.toggleHnRStatus = function (req, res) {
res.json(torrent);
//remove the complete data and update user`s warning number when the H&R prop to false
removeTorrentHnRWarning(torrent._id);
if (!torrent.torrent_hnr)
removeTorrentHnRWarning(torrent._id);
}
});
};