Avoid logging uuid on loading object attribute

If the object is not yet saved, the 'uuid' attribute is not populated
and loading this attribute will fail.

Change-Id: Ic716a494238c453ff3fd488d34e19d53b943e898
This commit is contained in:
Hongbin Lu 2019-02-24 19:44:08 +00:00
parent 9f03c3e941
commit af15632d56
1 changed files with 1 additions and 2 deletions

View File

@ -264,10 +264,9 @@ class VolumeMapping(base.ZunPersistentObject, base.ZunObject):
raise exception.OrphanedObjectError(method='obj_load_attr',
objtype=self.obj_name())
LOG.debug("Lazy-loading '%(attr)s' on %(name)s uuid %(uuid)s",
LOG.debug("Lazy-loading '%(attr)s' on %(name)s",
{'attr': attrname,
'name': self.obj_name(),
'uuid': self.uuid,
})
if attrname in VOLUME_ATTRS: