Skip to content

Commit

Permalink
added null safe cleanup check
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinSMueller committed May 4, 2023
1 parent fe06050 commit 4ad022d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,7 @@ def _load_all(self, tx, file_list, loading_mode, split, wipe_db):
# Remove extra spaces at beginning and end of the keys and values
@staticmethod
def cleanup_node(node):
obj = {}
for key, value in node.items():
obj[key.strip()] = value.strip()
return obj
return {key if not key else key.strip(): value if not value else value.strip() for key, value in node.items()}

# Cleanup values for Boolean, Int and Float types
# Add uuid to nodes if one not exists
Expand Down

0 comments on commit 4ad022d

Please sign in to comment.