use open filter for checke frontend trade

This commit is contained in:
Cayo Puigdefabregas 2021-06-02 15:33:03 +02:00
parent 0c99a85361
commit e4554a9e27
2 changed files with 11 additions and 6 deletions

View File

@ -517,8 +517,11 @@ class Trade(ActionWithMultipleDevices):
)
user_from = NestedOn(s_user.User, dump_only=True, data_key='userFrom')
code = SanitizedStr(validate=Length(max=STR_SIZE), data_key='code', required=False)
confirm = Boolean(data_key='confirms', missing=False, description="""If you need confirmation of the user
you need actevate this field""")
confirm = Boolean(
data_key='confirms',
missing=True,
description="""If you need confirmation of the user you need actevate this field"""
)
lot = NestedOn('Lot',
many=False,
required=True,

View File

@ -150,7 +150,9 @@ class DeviceView(View):
)
def query(self, args):
query = Device.query.filter((Device.owner_id == g.user.id)).distinct()
query = Device.query.filter().distinct()
# import pdb; pdb.set_trace()
# query = Device.query.filter((Device.owner_id == g.user.id)).distinct()
search_p = args.get('search', None)
if search_p:
properties = DeviceSearch.properties