Prevent AttributeError when self.obj is None.
This commit is contained in:
parent
1248428d13
commit
31e7aa1253
1 changed files with 1 additions and 1 deletions
|
|
@ -429,7 +429,7 @@ class Command(with_metaclass(CommandMeta, object)):
|
||||||
object, conventionally with a preceding space.
|
object, conventionally with a preceding space.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if hasattr(self, 'obj') and self.obj != caller:
|
if hasattr(self, 'obj') and self.obj and self.obj != caller:
|
||||||
return " (%s)" % self.obj.get_display_name(caller).strip()
|
return " (%s)" % self.obj.get_display_name(caller).strip()
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue