mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Fixed update query to revert challenge tags when broken (#9791)
This commit is contained in:
@@ -341,7 +341,7 @@ schema.methods.closeChal = async function closeChal (broken = {}) {
|
||||
// Set the challenge tag to non-challenge status and remove the challenge from the user's challenges
|
||||
User.update({
|
||||
challenges: challenge._id,
|
||||
'tags._id': challenge._id,
|
||||
'tags.id': challenge._id,
|
||||
}, {
|
||||
$set: {'tags.$.challenge': false},
|
||||
$pull: {challenges: challenge._id},
|
||||
|
||||
Reference in New Issue
Block a user