use open filter for checke frontend trade
This commit is contained in:
parent
0c99a85361
commit
e4554a9e27
|
@ -503,22 +503,25 @@ class Trade(ActionWithMultipleDevices):
|
||||||
date = DateTime(data_key='date', required=False)
|
date = DateTime(data_key='date', required=False)
|
||||||
price = Float(required=False, data_key='price')
|
price = Float(required=False, data_key='price')
|
||||||
user_to_email = SanitizedStr(
|
user_to_email = SanitizedStr(
|
||||||
validate=Length(max=STR_SIZE),
|
validate=Length(max=STR_SIZE),
|
||||||
data_key='userToEmail',
|
data_key='userToEmail',
|
||||||
missing='',
|
missing='',
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
user_to = NestedOn(s_user.User, dump_only=True, data_key='userTo')
|
user_to = NestedOn(s_user.User, dump_only=True, data_key='userTo')
|
||||||
user_from_email = SanitizedStr(
|
user_from_email = SanitizedStr(
|
||||||
validate=Length(max=STR_SIZE),
|
validate=Length(max=STR_SIZE),
|
||||||
data_key='userFromEmail',
|
data_key='userFromEmail',
|
||||||
missing='',
|
missing='',
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
user_from = NestedOn(s_user.User, dump_only=True, data_key='userFrom')
|
user_from = NestedOn(s_user.User, dump_only=True, data_key='userFrom')
|
||||||
code = SanitizedStr(validate=Length(max=STR_SIZE), data_key='code', required=False)
|
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
|
confirm = Boolean(
|
||||||
you need actevate this field""")
|
data_key='confirms',
|
||||||
|
missing=True,
|
||||||
|
description="""If you need confirmation of the user you need actevate this field"""
|
||||||
|
)
|
||||||
lot = NestedOn('Lot',
|
lot = NestedOn('Lot',
|
||||||
many=False,
|
many=False,
|
||||||
required=True,
|
required=True,
|
||||||
|
|
|
@ -150,7 +150,9 @@ class DeviceView(View):
|
||||||
)
|
)
|
||||||
|
|
||||||
def query(self, args):
|
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)
|
search_p = args.get('search', None)
|
||||||
if search_p:
|
if search_p:
|
||||||
properties = DeviceSearch.properties
|
properties = DeviceSearch.properties
|
||||||
|
|
Reference in New Issue