summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gitlab/objects.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index e95a894..e00a4ed 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -398,7 +398,9 @@ class GitlabObject(object):
if kwargs:
for k, v in kwargs.items():
- self.__dict__[k] = v
+ # Don't overwrite attributes returned by the server (#171)
+ if k not in self.__dict__ or not self.__dict__[k]:
+ self.__dict__[k] = v
# Special handling for api-objects that don't have id-number in api
# responses. Currently only Labels and Files