diff options
Diffstat (limited to 'py-fake-service/app/adapter')
-rw-r--r-- | py-fake-service/app/adapter/tag.py | 2 | ||||
-rw-r--r-- | py-fake-service/app/adapter/tagsset.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/py-fake-service/app/adapter/tag.py b/py-fake-service/app/adapter/tag.py index a0f3ec1b..bc5bee95 100644 --- a/py-fake-service/app/adapter/tag.py +++ b/py-fake-service/app/adapter/tag.py @@ -10,7 +10,7 @@ class Tag: } self.ident = ident - self.name = name + self.name = name.lower() self.default = name in self.DEFAULT_TAGS def increment_count(self): diff --git a/py-fake-service/app/adapter/tagsset.py b/py-fake-service/app/adapter/tagsset.py index 803c921c..67f4379d 100644 --- a/py-fake-service/app/adapter/tagsset.py +++ b/py-fake-service/app/adapter/tagsset.py @@ -16,6 +16,7 @@ class TagsSet: def mark_as_read(self, tags): for tag in tags: + tag = tag.lower() tag = self.tags.get(tag) tag.increment_read() @@ -30,7 +31,8 @@ class TagsSet: self.tags.get(tag).decrement_count() def _create_new_tag(self, tag): - tag = self.tags.setdefault(tag, Tag(tag, self.ident)) + tag = Tag(tag, self.ident) + tag = self.tags.setdefault(tag.name, tag) self.ident += 1 return tag |