default function args can never be mutable

This commit is contained in:
Nick Sweeting 2020-11-28 01:06:11 -05:00
parent 411fdcac87
commit 910f3d65c7

View file

@ -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)