Skip to content

Commit

Permalink
Bugfixes rename upper-lowercase after testrun
Browse files Browse the repository at this point in the history
  • Loading branch information
Ozzie Isaacs committed Jun 8, 2023
1 parent bd4b7ff commit 3ef34c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cps/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def __init__(self, lang_code):
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
Expand Down
6 changes: 4 additions & 2 deletions cps/editbooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ef34c8

Please sign in to comment.