diff --git a/eNMS/controller.py b/eNMS/controller.py index 4761d2ccd..ff2f15bff 100644 --- a/eNMS/controller.py +++ b/eNMS/controller.py @@ -1185,7 +1185,7 @@ def save_file(self, filepath, **kwargs): return content def save_positions(self, type, id, **kwargs): - now, old_position = vs.get_time(), None + now = vs.get_time() instance = db.fetch(type, allow_none=True, id=id, rbac="edit") if not instance: return @@ -1194,10 +1194,8 @@ def save_positions(self, type, id, **kwargs): new_position = [position["x"], position["y"]] if "-" not in id: relation = db.fetch(relation_type, id=id, rbac=None) - old_position = relation.positions.get(instance.name) relation.positions[instance.name] = new_position elif id in instance.labels: - old_position = instance.labels[id].pop("positions") instance.labels[id] = {"positions": new_position, **instance.labels[id]} return now diff --git a/eNMS/runner.py b/eNMS/runner.py index 0cf2fa360..185b5b8ec 100644 --- a/eNMS/runner.py +++ b/eNMS/runner.py @@ -1296,11 +1296,8 @@ def enter_remote_device(self, connection, device): for send, expect in commands: if not send: continue - self.log( - "info", - f"Sent '{send if password and send != password else 'jump on connect password'}'" - f", waiting for '{expect}'", - ) + pwd = send if password and send != password else "jump on connect password" + self.log("info", f"Sent '{pwd}'" f", waiting for '{expect}'") connection.send_command( send, expect_string=expect,