diff options
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/adapter/tag.py | 2 | ||||
-rw-r--r-- | service/pixelated/adapter/tag_service.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/service/pixelated/adapter/tag.py b/service/pixelated/adapter/tag.py index 2e965fdf..d75022f9 100644 --- a/service/pixelated/adapter/tag.py +++ b/service/pixelated/adapter/tag.py @@ -22,7 +22,7 @@ class Tag: @classmethod def from_dict(cls, tag_dict): tag = Tag(tag_dict['name'], tag_dict['default']) - tag.mails = tag_dict['mails'] + tag.mails = set(tag_dict['mails']) return tag @classmethod diff --git a/service/pixelated/adapter/tag_service.py b/service/pixelated/adapter/tag_service.py index dc13bc54..874a9a58 100644 --- a/service/pixelated/adapter/tag_service.py +++ b/service/pixelated/adapter/tag_service.py @@ -45,6 +45,8 @@ class TagService: def notify_tags_updated(self, added_tags, removed_tags, mail_ident): for removed_tag in removed_tags: tag = self.tag_index.get(removed_tag) + if not tag: + continue tag.decrement(mail_ident) if tag.total == 0: self.tag_index.remove(tag.name) |