changeset 1819:fe4dd7e7c4ba

fix corruption of choice uris to strings when KC saves them Ignore-this: 2de843511fc7e8ad8b030406d47707fb
author drewp@bigasterisk.com
date Fri, 08 Jun 2018 23:12:04 +0000
parents 083137dae55d
children a07f1d87a07f
files light9/effect/settings.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/light9/effect/settings.py	Fri Jun 08 21:50:09 2018 +0000
+++ b/light9/effect/settings.py	Fri Jun 08 23:12:04 2018 +0000
@@ -215,10 +215,12 @@
                 
             scaledAttributeTypes = [L9['color'], L9['brightness'], L9['uv']]
             settingType = L9['scaledValue'] if attr in scaledAttributeTypes else L9['value']
+            if not isinstance(val, URIRef):
+                val = Literal(val)
             add.extend([
                 (setting, L9['device'], dev, ctx),
                 (setting, L9['deviceAttr'], attr, ctx),
-                (setting, settingType, Literal(val), ctx),
+                (setting, settingType, val, ctx),
                 ])
             settingsSubgraphCache.add(setting)