Skip to content

Commit

Permalink
Bugfix: during the import of a XML, the process was broken due to a l…
Browse files Browse the repository at this point in the history
…ate declaration of the variable 'ext' (#617)
  • Loading branch information
slippyex authored Aug 23, 2024
1 parent ee3b3e4 commit 31b86a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion models/Box.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,8 @@ def avatar(self):
@avatar.setter
def avatar(self, image_data):
avatar_path = "upload"
ext = avatar_validation(image_data)

if isinstance(image_data, tuple):
image_data, avatar_path = image_data

Expand All @@ -356,7 +358,6 @@ def avatar(self, image_data):
if avatar_path == "upload":
os.path.join("upload", f"{self.uuid}.{ext}")

ext = avatar_validation(image_data)
self._avatar = save_avatar(avatar_path, image_data)

@property
Expand Down

0 comments on commit 31b86a2

Please sign in to comment.