Merge "Use obj_attr_is_set to check whether an attr is set in oslo_versionedobject"

This commit is contained in:
Jenkins 2016-03-02 04:56:00 +00:00 committed by Gerrit Code Review
commit def0cce268
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class MagnumObject(ovoo_base.VersionedObject):
def as_dict(self):
return {k: getattr(self, k)
for k in self.fields
if hasattr(self, k)}
if self.obj_attr_is_set(k)}
class MagnumObjectDictCompat(ovoo_base.VersionedObjectDictCompat):