Fix #384: duplicate tags due to case insensitivity

This commit is contained in:
Daniel Quinn
2018-09-02 20:48:51 +01:00
parent cccc9e1a24
commit f1e1bb4deb
2 changed files with 19 additions and 3 deletions

View File

@@ -442,8 +442,10 @@ class FileInfo:
def _get_tags(cls, tags):
r = []
for t in tags.split(","):
r.append(
Tag.objects.get_or_create(slug=t, defaults={"name": t})[0])
r.append(Tag.objects.get_or_create(
slug=t.lower(),
defaults={"name": t}
)[0])
return tuple(r)
@classmethod