Fix d'un pb d'alias non existant
This commit is contained in:
parent
7efae63920
commit
57a514e7b2
@ -433,7 +433,10 @@ class EventAddPlaceForm(Form):
|
|||||||
self.instance.exact_location = place
|
self.instance.exact_location = place
|
||||||
self.instance.save()
|
self.instance.save()
|
||||||
if self.cleaned_data.get("add_alias"):
|
if self.cleaned_data.get("add_alias"):
|
||||||
place.aliases.append(self.instance.location)
|
if place.aliases:
|
||||||
|
place.aliases.append(self.instance.location)
|
||||||
|
else:
|
||||||
|
place.aliases = [self.instance.location]
|
||||||
place.save()
|
place.save()
|
||||||
|
|
||||||
return self.instance
|
return self.instance
|
||||||
|
Loading…
Reference in New Issue
Block a user