Browse Source

default function args can never be mutable

Nick Sweeting 5 năm trước cách đây
mục cha
commit
910f3d65c7
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      archivebox/core/models.py

+ 1 - 1
archivebox/core/models.py

@@ -151,7 +151,7 @@ class Snapshot(models.Model):
             return self.history['title'][-1].output.strip()
         return None
 
-    def save_tags(self, tags=[]):
+    def save_tags(self, tags=()):
         tags_id = []
         for tag in tags:
             tags_id.append(Tag.objects.get_or_create(name=tag)[0].id)