Fix d'un pb d'alias non existant

This commit is contained in:
Jean-Marie Favreau 2024-06-02 15:17:36 +02:00
parent 7efae63920
commit 57a514e7b2

View File

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