Satisfy "Codacy/PR Quality Review"

This commit is contained in:
Virgil Grigoras 2018-10-01 10:45:51 +02:00
parent 1ac9b3d837
commit a798dc94a9

View File

@ -533,7 +533,7 @@ def fill_indexpage(page, database, db_filter, order, *join):
# if elements have to be deleted, because they are no longer used # if elements have to be deleted, because they are no longer used
def modify_database_object(input_elements, db_book_object, db_object, db_session, db_type): def modify_database_object(input_elements, db_book_object, db_object, db_session, db_type):
# passing input_elements not as a list may lead to undesired results # passing input_elements not as a list may lead to undesired results
if type(input_elements) is not list: if not isinstance(input_elements, list):
raise TypeError(str(input_elements) + " should be passed as a list") raise TypeError(str(input_elements) + " should be passed as a list")
input_elements = [x for x in input_elements if x != ''] input_elements = [x for x in input_elements if x != '']