From 31b86a25dd2a10da712dbd6aee23352f217cf0b9 Mon Sep 17 00:00:00 2001 From: slippyvex Date: Fri, 23 Aug 2024 14:31:40 +0200 Subject: [PATCH] Bugfix: during the import of a XML, the process was broken due to a late declaration of the variable 'ext' (#617) --- models/Box.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/Box.py b/models/Box.py index dd4d79ae..6757413a 100644 --- a/models/Box.py +++ b/models/Box.py @@ -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 @@ -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