removed slugs entirely, since their only purpose was purely cosmetic anyway.

This commit is contained in:
jonaswinkler
2020-12-09 00:04:37 +01:00
parent 1357ee83a0
commit ba7bf9b2d2
9 changed files with 55 additions and 36 deletions

View File

@@ -29,10 +29,7 @@ def _tags_from_path(filepath):
path_parts = Path(filepath).relative_to(
settings.CONSUMPTION_DIR).parent.parts
for part in path_parts:
tag_ids.add(Tag.objects.get_or_create(
slug=slugify(part),
defaults={"name": part},
)[0].pk)
tag_ids.add(Tag.objects.get_or_create(name=part)[0].pk)
return tag_ids