From 74dde2e62693604f880d85c2435c36d01dd02634 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 5 Oct 2022 13:44:29 +0200 Subject: [PATCH] fix form new device --- ereuse_devicehub/inventory/forms.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index eac9fcfa..b1503c6e 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -481,6 +481,14 @@ class NewDeviceForm(FlaskForm): if self.image.data == '': self.image.data = None + if self.manufacturer.data: + self.manufacturer.data = self.manufacturer.data.lower() + if self.model.data: + self.model.data = self.model.data.lower() + if self.serial_number.data: + self.serial_number.data = self.serial_number.data.lower() + if self.part_number.data: + self.part_number.data = self.part_number.data.lower() return True