diff --git a/mongoengine/base.py b/mongoengine/base.py index f73af4cc..c2d74f3d 100644 --- a/mongoengine/base.py +++ b/mongoengine/base.py @@ -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.