fixed deallocate code bug

This commit is contained in:
Cayo Puigdefabregas 2020-11-26 19:08:07 +01:00
parent 988f5c1751
commit daeae1b4b4
2 changed files with 4 additions and 2 deletions

View file

@ -321,7 +321,9 @@ class Allocate(JoinedTableMixin, ActionWithMultipleDevices):
class Deallocate(JoinedTableMixin, ActionWithMultipleDevices): class Deallocate(JoinedTableMixin, ActionWithMultipleDevices):
"""The act of deallocate one list of devices to one person of the system or not """The act of deallocate one list of devices to one person of the system or not
""" """
pass code = Column(CIText(), default='', nullable=True)
code.comment = """ This is a internal code for mainteing the secrets of the personal datas of the new holder """
end_users = Column(Numeric(precision=4), check_range('end_users', 0), nullable=True)
class EraseBasic(JoinedWithOneDeviceMixin, ActionWithOneDevice): class EraseBasic(JoinedWithOneDeviceMixin, ActionWithOneDevice):

View file

@ -253,7 +253,7 @@ def test_live(user: UserClient, app: Devicehub):
snapshot, _ = user.post(acer, res=models.Snapshot) snapshot, _ = user.post(acer, res=models.Snapshot)
device_id = snapshot['device']['id'] device_id = snapshot['device']['id']
db_device = Device.query.filter_by(id=1).one() db_device = Device.query.filter_by(id=1).one()
post_request = {"Transaction": "ccc", "name": "John", "end_users": 1, post_request = {"transaction": "ccc", "name": "John", "end_users": 1,
"devices": [device_id], "description": "aaa", "devices": [device_id], "description": "aaa",
"start_time": "2020-11-01T02:00:00+00:00", "start_time": "2020-11-01T02:00:00+00:00",
"end_time": "2020-12-01T02:00:00+00:00" "end_time": "2020-12-01T02:00:00+00:00"