always copy dict on Location.__init__ because it could be the default
This commit is contained in:
parent
4595920337
commit
9cf48cb609
1 changed files with 4 additions and 0 deletions
|
@ -57,6 +57,10 @@ class Location(LocationSlug, EditorFormMixin, models.Model):
|
||||||
class Meta:
|
class Meta:
|
||||||
abstract = True
|
abstract = True
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
self.titles = self.titles.copy()
|
||||||
|
|
||||||
def serialize(self, detailed=True, **kwargs):
|
def serialize(self, detailed=True, **kwargs):
|
||||||
result = super().serialize(**kwargs)
|
result = super().serialize(**kwargs)
|
||||||
if not detailed:
|
if not detailed:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue