Skip to content

Commit

Permalink
use get instead of subscript
Browse files Browse the repository at this point in the history
  • Loading branch information
contrick64 committed Dec 18, 2024
1 parent 00f032b commit 29d8bb8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def make_ingestable(data: pd.DataFrame):

parented_data = []
for row in data_dict:
if row['ingestcomplete'] and not row['pid']:
if row.get('ingestcomplete') and not row.get('pid'):
logging.debug(f'ingest already completed for {row["itemTitle"]}')
continue
if not row['identifierFileName'] or not row["filepath"]:
Expand All @@ -153,7 +153,8 @@ def make_ingestable(data: pd.DataFrame):

if row["pid"]:
for child in data_dict:
if child['ingestcomplete']:
if child.get('ingestcomplete'):
logging.info(f"ingest already completed for {child['itemTitle']}")
continue
if not child['identifierFileName']:
continue
Expand Down

0 comments on commit 29d8bb8

Please sign in to comment.