fix transfer action

This commit is contained in:
Cayo Puigdefabregas 2022-07-16 17:16:21 +02:00
parent 9e42ccafc0
commit eda61f7808
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import copy
from ereuse_devicehub.config import DevicehubConfig from ereuse_devicehub.config import DevicehubConfig
from ereuse_devicehub.db import db from ereuse_devicehub.db import db
from ereuse_devicehub.devicehub import Devicehub from ereuse_devicehub.devicehub import Devicehub
from ereuse_devicehub.inventory.models import Transfer
from ereuse_devicehub.resources.action.models import ( from ereuse_devicehub.resources.action.models import (
ActionDevice, ActionDevice,
Allocate, Allocate,
@ -85,6 +86,7 @@ def manual_actions():
DataWipe, DataWipe,
ToRepair, ToRepair,
Ready, Ready,
Transfer,
) )
for action in MANUAL_ACTIONS: for action in MANUAL_ACTIONS:
@ -93,7 +95,6 @@ def manual_actions():
def change_device(action): def change_device(action):
for ac in action.query.all(): for ac in action.query.all():
# import pdb; pdb.set_trace()
if hasattr(ac, 'device'): if hasattr(ac, 'device'):
if not ac.device.binding: if not ac.device.binding:
continue continue