Merge pull request #456 from eReuse/bugfix/4418-datastorage-placeholder

fix bug
This commit is contained in:
cayop 2023-06-13 11:47:57 +02:00 committed by GitHub
commit 48604e1a8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -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)

View File

@ -56,6 +56,12 @@
<option value="Cellphone"
{% if form.type.data == 'Cellphone' %} selected="selected"{% endif %}>Cellphone</option>
</optgroup>
<optgroup label="Data Storage">
<option value="HardDrive"
{% if form.type.data == 'HardDrive' %} selected="selected"{% endif %}>HardDrive</option>
<option value="SolidStateDrive"
{% if form.type.data == 'SolidStateDrive' %} selected="selected"{% endif %}>SolidStateDrive</option>
</optgroup>
<optgroup label="Computer Accessory">
<option value="Mouse"
{% if form.type.data == 'Mouse' %} selected="selected"{% endif %}>Mouse</option>