fix form new device

This commit is contained in:
Cayo Puigdefabregas 2022-10-05 13:44:29 +02:00
parent 722ee1a261
commit 74dde2e626
1 changed files with 8 additions and 0 deletions

View File

@ -481,6 +481,14 @@ class NewDeviceForm(FlaskForm):
if self.image.data == '': if self.image.data == '':
self.image.data = None 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 return True