From ee6220193fa47fd8980b6f6011d0ce7c4588c2bb Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Sun, 17 Jan 2021 00:07:27 -0800 Subject: [PATCH] Fixed property update if property value happens to be 0 --- src/Mod/Path/PathScripts/PathUtil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathUtil.py b/src/Mod/Path/PathScripts/PathUtil.py index 7c423af22f..db43b466e5 100644 --- a/src/Mod/Path/PathScripts/PathUtil.py +++ b/src/Mod/Path/PathScripts/PathUtil.py @@ -71,7 +71,7 @@ def getPropertyValueString(obj, prop): def setProperty(obj, prop, value): '''setProperty(obj, prop, value) ... set the property value of obj's property defined by its canonical name.''' o, attr, name = _getProperty(obj, prop) # pylint: disable=unused-variable - if attr and type(value) == str: + if not attr is None and type(value) == str: if type(attr) == int: value = int(value, 0) elif type(attr) == bool: