changes from review
This commit is contained in:
parent
2f761f338a
commit
0c1e5b8307
|
@ -1510,8 +1510,7 @@ def update_components_action_one(target: ActionWithOneDevice, device: Device, __
|
||||||
target.components.clear()
|
target.components.clear()
|
||||||
if isinstance(device, Computer):
|
if isinstance(device, Computer):
|
||||||
target.components |= device.components
|
target.components |= device.components
|
||||||
else:
|
elif isinstance(device, Computer):
|
||||||
if isinstance(device, Computer):
|
|
||||||
device.add_mac_to_hid()
|
device.add_mac_to_hid()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,6 @@ class ActionView(View):
|
||||||
action = Action.query.filter_by(id=id).one()
|
action = Action.query.filter_by(id=id).one()
|
||||||
return self.schema.jsonify(action)
|
return self.schema.jsonify(action)
|
||||||
|
|
||||||
|
|
||||||
def snapshot(self, snapshot_json: dict, resource_def):
|
def snapshot(self, snapshot_json: dict, resource_def):
|
||||||
"""Performs a Snapshot.
|
"""Performs a Snapshot.
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ class Sync:
|
||||||
of the passed-in components.
|
of the passed-in components.
|
||||||
2. A list of Add / Remove (not yet added to session).
|
2. A list of Add / Remove (not yet added to session).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
db_device = self.execute_register(device)
|
db_device = self.execute_register(device)
|
||||||
db_components, actions = OrderedSet(), OrderedSet()
|
db_components, actions = OrderedSet(), OrderedSet()
|
||||||
if components is not None: # We have component info (see above)
|
if components is not None: # We have component info (see above)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import datetime
|
|
||||||
import copy
|
import copy
|
||||||
|
import datetime
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
Reference in New Issue