Bugfixes rename upper-lowercase after testrun
This commit is contained in:
parent
bd4b7ffaba
commit
3ef34c8f15
|
@ -287,7 +287,7 @@ class Languages(Base):
|
|||
self.lang_code = lang_code
|
||||
|
||||
def get(self):
|
||||
if self.language_name:
|
||||
if hasattr(self, "language_name"):
|
||||
return self.language_name
|
||||
else:
|
||||
return self.lang_code
|
||||
|
|
|
@ -1319,10 +1319,12 @@ def remove_objects(db_book_object, db_session, del_elements):
|
|||
|
||||
def add_objects(db_book_object, db_object, db_session, db_type, add_elements):
|
||||
changed = False
|
||||
if db_type == 'custom':
|
||||
if db_type == 'languages':
|
||||
db_filter = db_object.lang_code
|
||||
elif db_type == 'custom':
|
||||
db_filter = db_object.value
|
||||
else:
|
||||
db_filter = db_object
|
||||
db_filter = db_object.name
|
||||
for add_element in add_elements:
|
||||
# check if an element with that name exists
|
||||
changed = True
|
||||
|
|
Loading…
Reference in New Issue
Block a user