search the bug

This commit is contained in:
Cayo Puigdefabregas 2020-11-30 16:37:52 +01:00
parent 7c1c8060c5
commit dd42b10ba5
2 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,12 @@ class Action(Thing):
parent = NestedOn(s_device.Computer, dump_only=True, description=m.Action.parent_id.comment) parent = NestedOn(s_device.Computer, dump_only=True, description=m.Action.parent_id.comment)
url = URL(dump_only=True, description=m.Action.url.__doc__) url = URL(dump_only=True, description=m.Action.url.__doc__)
@validates_schema
def validate_end_time(self, data: dict):
if 'end_time' in data:
import pdb; pdb.set_trace()
pass
class ActionWithOneDevice(Action): class ActionWithOneDevice(Action):
__doc__ = m.ActionWithOneDevice.__doc__ __doc__ = m.ActionWithOneDevice.__doc__

View File

@ -143,6 +143,7 @@ class DeviceView(View):
# Compute query # Compute query
query = self.query(args) query = self.query(args)
devices = query.paginate(page=args['page'], per_page=30) # type: Pagination devices = query.paginate(page=args['page'], per_page=30) # type: Pagination
import pdb; pdb.set_trace()
return things_response( return things_response(
self.schema.dump(devices.items, many=True, nested=1), self.schema.dump(devices.items, many=True, nested=1),
devices.page, devices.per_page, devices.total, devices.prev_num, devices.next_num devices.page, devices.per_page, devices.total, devices.prev_num, devices.next_num