Skip to content

Commit

Permalink
Fixed property update if property value happens to be 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mlampert committed Jan 27, 2021
1 parent 9b7aa77 commit ee62201
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mod/Path/PathScripts/PathUtil.py
Expand Up @@ -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:
Expand Down

0 comments on commit ee62201

Please sign in to comment.