Commit 8fa31b8b authored by abuddenberg's avatar abuddenberg
Browse files

Fixed incredibily stupid bug in base merge method

parent 56bebe06
...@@ -46,7 +46,8 @@ class Gcisbase(object): ...@@ -46,7 +46,8 @@ class Gcisbase(object):
for attr, value in attrs_we_care_about: for attr, value in attrs_we_care_about:
if value in (None, '') and hasattr(other, attr): if value in (None, '') and hasattr(other, attr):
setattr(self, attr, value) setattr(self, attr, getattr(other, attr))
return self return self
def as_json(self, indent=0, omit_fields=[]): def as_json(self, indent=0, omit_fields=[]):
...@@ -122,7 +123,7 @@ class Figure(Gcisbase): ...@@ -122,7 +123,7 @@ class Figure(Gcisbase):
return self.__str__() return self.__str__()
def merge(self, other): def merge(self, other):
#Special handling for Chapters # Special handling for Chapters
if isinstance(other.chapter, Chapter) and isinstance(self.chapter, Chapter): if isinstance(other.chapter, Chapter) and isinstance(self.chapter, Chapter):
self.chapter.merge(other.chapter) self.chapter.merge(other.chapter)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment