diff --git a/anki/groups.py b/anki/groups.py index a4ac9af39..0dc4e0815 100644 --- a/anki/groups.py +++ b/anki/groups.py @@ -146,6 +146,9 @@ class GroupManager(object): # delete the group and add a grave del self.groups[str(gid)] self.deck._logRem([gid], REM_GROUP) + # ensure we have an active group + if gid in self.active(): + self.select(int(self.groups.keys()[0])) self.save() def allNames(self):