mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-18 20:04:38 +00:00
fix leaders migrations when there are no other members
This commit is contained in:
parent
ea477823f6
commit
15eef927a2
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ dbGroups.findEach({}, {_id: 1, members: 1, leader: 1}, {batchSize: 500}, functio
|
|||
if(err) throw err;
|
||||
|
||||
// If leader has deleted account
|
||||
if(count < 1 && (group._id !== 'habitrpg')) {
|
||||
if(count < 1 && (group._id !== 'habitrpg') && members && members[0]) {
|
||||
dbGroups.update({
|
||||
_id: group._id
|
||||
}, {
|
||||
|
|
|
|||
Loading…
Reference in a new issue