mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-27 02:20:31 +00:00
Safer user of "lower"
This commit is contained in:
parent
bee3c86223
commit
ba390dc3ad
1 changed files with 4 additions and 1 deletions
|
@ -90,7 +90,10 @@ class Importer:
|
|||
|
||||
def get_shelf(self, normalized_row):
|
||||
"""determine which shelf to use"""
|
||||
shelf_name = normalized_row["shelf"].lower()
|
||||
shelf_name = normalized_row.get("shelf")
|
||||
if not shelf_name:
|
||||
return None
|
||||
shelf_name = shelf_name.lower()
|
||||
shelf = [
|
||||
s for (s, gs) in self.shelf_mapping_guesses.items() if shelf_name in gs
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue