Browse Source

fix migration creating conflicting tags based on slug

Nick Sweeting 4 years ago
parent
commit
aa84a7ff2b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      archivebox/core/migrations/0006_auto_20201012_1520.py

+ 1 - 1
archivebox/core/migrations/0006_auto_20201012_1520.py

@@ -17,7 +17,7 @@ def forwards_func(apps, schema_editor):
         tag_set.discard("")
         tag_set.discard("")
 
 
         for tag in tag_set:
         for tag in tag_set:
-            to_add, _ = TagModel.objects.get_or_create(name=tag, slug=slugify(tag))
+            to_add, _ = TagModel.objects.get_or_create(name=tag, defaults={'slug': slugify(tag)})
             snapshot.tags.add(to_add)
             snapshot.tags.add(to_add)