We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0a0fcaf + 6d55120 commit 09522b3Copy full SHA for 09522b3
2 files changed
gitlab/base.py
@@ -45,6 +45,7 @@ class RESTObject(object):
45
_attrs: Dict[str, Any]
46
_module: ModuleType
47
_parent_attrs: Dict[str, Any]
48
+ _short_print_attr: Optional[str] = None
49
_updated_attrs: Dict[str, Any]
50
manager: "RESTManager"
51
gitlab/v4/cli.py
@@ -380,7 +380,7 @@ def display_dict(d, padding):
380
if obj._id_attr:
381
id = getattr(obj, obj._id_attr)
382
print("%s: %s" % (obj._id_attr.replace("_", "-"), id))
383
- if hasattr(obj, "_short_print_attr"):
+ if obj._short_print_attr:
384
value = getattr(obj, obj._short_print_attr) or "None"
385
value = value.replace("\r", "").replace("\n", " ")
386
# If the attribute is a note (ProjectCommitComment) then we do
0 commit comments