fix bug
This commit is contained in:
parent
7c032a2d27
commit
314e944208
|
@ -622,7 +622,7 @@ class NewDeviceForm(FlaskForm):
|
||||||
|
|
||||||
if self.type.data in ['HardDrive', 'SolidStateDrive']:
|
if self.type.data in ['HardDrive', 'SolidStateDrive']:
|
||||||
if self.data_storage_size.data:
|
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)
|
device.image = URL(self.image.data)
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,12 @@
|
||||||
<option value="Cellphone"
|
<option value="Cellphone"
|
||||||
{% if form.type.data == 'Cellphone' %} selected="selected"{% endif %}>Cellphone</option>
|
{% if form.type.data == 'Cellphone' %} selected="selected"{% endif %}>Cellphone</option>
|
||||||
</optgroup>
|
</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">
|
<optgroup label="Computer Accessory">
|
||||||
<option value="Mouse"
|
<option value="Mouse"
|
||||||
{% if form.type.data == 'Mouse' %} selected="selected"{% endif %}>Mouse</option>
|
{% if form.type.data == 'Mouse' %} selected="selected"{% endif %}>Mouse</option>
|
||||||
|
|
Reference in New Issue