changes from review

This commit is contained in:
Cayo Puigdefabregas 2020-11-25 18:42:36 +01:00
parent 2f761f338a
commit 0c1e5b8307
4 changed files with 2 additions and 5 deletions

View File

@ -1510,8 +1510,7 @@ def update_components_action_one(target: ActionWithOneDevice, device: Device, __
target.components.clear()
if isinstance(device, Computer):
target.components |= device.components
else:
if isinstance(device, Computer):
elif isinstance(device, Computer):
device.add_mac_to_hid()

View File

@ -100,7 +100,6 @@ class ActionView(View):
action = Action.query.filter_by(id=id).one()
return self.schema.jsonify(action)
def snapshot(self, snapshot_json: dict, resource_def):
"""Performs a Snapshot.

View File

@ -52,7 +52,6 @@ class Sync:
of the passed-in components.
2. A list of Add / Remove (not yet added to session).
"""
db_device = self.execute_register(device)
db_components, actions = OrderedSet(), OrderedSet()
if components is not None: # We have component info (see above)

View File

@ -1,5 +1,5 @@
import datetime
import copy
import datetime
import pytest
from uuid import UUID