Don't run unset on IntField if the value is 0 (zero).

This commit is contained in:
Kristinn Örn Sigurðsson 2013-04-04 17:09:05 +02:00
parent 9f58bc9207
commit dd006a502e

View File

@ -1207,7 +1207,7 @@ class BaseDocument(object):
# Determine if any changed items were actually unset.
for path, value in set_data.items():
if value or isinstance(value, bool):
if value or isinstance(value, bool) or isinstance(value, int):
continue
# If we've set a value that ain't the default value dont unset it.