diff --git a/scopes/storage/tracking.py b/scopes/storage/tracking.py index 7330209..3b50d70 100644 --- a/scopes/storage/tracking.py +++ b/scopes/storage/tracking.py @@ -53,6 +53,11 @@ class Track(object): else: self.data.update(data) + def storeTrack(self): + """Make changes of this track persistent by updating the corresponding row + in its container.""" + self.container.update(self) + @property def uid(self): if self.trackId is None: diff --git a/scopes/tlib_storage.py b/scopes/tlib_storage.py index 49f0cf8..e6b1b7d 100644 --- a/scopes/tlib_storage.py +++ b/scopes/tlib_storage.py @@ -70,6 +70,8 @@ def test_folder(self, config): ch1 = top['child1'] self.assertEqual(ch1.parent, top.rid) self.assertEqual(list(top.keys()), ['child1']) + ch1.set('name', 'level2-item1') + ch1.storeTrack() storage.commit()