fixing bug of trade without devices
This commit is contained in:
parent
2d305f5a43
commit
920937a51f
|
@ -707,6 +707,11 @@ class Trade(ActionWithMultipleDevices):
|
|||
required=True,
|
||||
only_query='id')
|
||||
|
||||
@pre_load
|
||||
def adding_devices(self, data: dict):
|
||||
if not 'devices' in data.keys():
|
||||
data['devices'] = []
|
||||
|
||||
@validates_schema
|
||||
def validate_lot(self, data: dict):
|
||||
if not g.user.email in [data['user_from_email'], data['user_to_email']]:
|
||||
|
|
Reference in a new issue