From 3393558d2002e1c47b0dccbc02ebbe114bcbc8eb Mon Sep 17 00:00:00 2001
From: David Hammer <dhammer@mailbox.org>
Date: Thu, 10 Feb 2022 12:33:31 +0100
Subject: [PATCH] Fixes relating to managed -> managedKeys

---
 src/calng/CalibrationManager.py |  4 ++--
 src/calng/scenes.py             | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/calng/CalibrationManager.py b/src/calng/CalibrationManager.py
index abde2474..24ddeaa5 100644
--- a/src/calng/CalibrationManager.py
+++ b/src/calng/CalibrationManager.py
@@ -309,7 +309,7 @@ class CalibrationManager(DeviceClientBase, Device):
             if ':' in name:
                 prefix = name[len('browse_schema:'):]
             else:
-                prefix = 'managed'
+                prefix = 'managedKeys'
             scene_data = scenes.recursive_subschema_scene(
                 self.deviceId,
                 self.getDeviceSchema(),
@@ -1268,7 +1268,7 @@ class CalibrationManager(DeviceClientBase, Device):
 
             # Add managed keys.
             for key in self._managed_keys:
-                value = get_property(self, f'managed.{key}')
+                value = get_property(self, f'managedKeys.{key}')
 
                 if not ismethod(value):
                     config[key] = value
diff --git a/src/calng/scenes.py b/src/calng/scenes.py
index 9edf8c40..e2de2737 100644
--- a/src/calng/scenes.py
+++ b/src/calng/scenes.py
@@ -662,24 +662,24 @@ def manager_device_overview_scene(
                 recursive_maybe_editable(
                     manager_device_id,
                     mds_hash,
-                    "managed.constantParameters",
+                    "managedKeys.constantParameters",
                 ),
                 DisplayCommandModel(
-                    keys=[f"{manager_device_id}.managed.loadMostRecentConstants"],
+                    keys=[f"{manager_device_id}.managedKeys.loadMostRecentConstants"],
                     width=10 * BASE_INC,
                     height=BASE_INC,
                 ),
                 recursive_maybe_editable(
                     manager_device_id,
                     mds_hash,
-                    "managed.preview",
+                    "managedKeys.preview",
                     max_depth=2,
                 ),
             ),
             recursive_maybe_editable(
                 manager_device_id,
                 mds_hash,
-                "managed.corrections",
+                "managedKeys.corrections",
                 max_depth=2,
             ),
         ),
@@ -909,7 +909,7 @@ def recursive_maybe_editable(
 def recursive_subschema_scene(
     device_id,
     device_schema,
-    prefix="managed",
+    prefix="managedKeys",
 ):
     mds_hash = schema_to_hash(device_schema)
     return recursive_maybe_editable(device_id, mds_hash, prefix)
-- 
GitLab