Skip to content

Commit

Permalink
Only delete if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Tschuppi81 committed Dec 1, 2023
1 parent febc6f7 commit a94b4f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/onegov/agency/forms/agency.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def update_model(self, model):
if self.organigram.data:
# with this the new file gets a new storage id and therefore
# a browser refresh is not required as the html changes
del model.organigram
if model.organigram:
del model.organigram
model.organigram_file = self.organigram.file
model.coordinates = self.coordinates.data
if hasattr(self, 'access'):
Expand Down

0 comments on commit a94b4f9

Please sign in to comment.