From 314e944208dee743ae5b5a85144e14759237fd51 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 13 Jun 2023 11:07:24 +0200 Subject: [PATCH] fix bug --- ereuse_devicehub/inventory/forms.py | 2 +- .../templates/inventory/upload_placeholder.html | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index 22666a3a..4cab06c5 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -622,7 +622,7 @@ class NewDeviceForm(FlaskForm): if self.type.data in ['HardDrive', 'SolidStateDrive']: if self.data_storage_size.data: - self._obj.size = self.data_storage_size.data * 1000 + device.size = self.data_storage_size.data * 1000 device.image = URL(self.image.data) diff --git a/ereuse_devicehub/templates/inventory/upload_placeholder.html b/ereuse_devicehub/templates/inventory/upload_placeholder.html index 6291589d..7763cd43 100644 --- a/ereuse_devicehub/templates/inventory/upload_placeholder.html +++ b/ereuse_devicehub/templates/inventory/upload_placeholder.html @@ -56,6 +56,12 @@ + + + +