Skip to content

Commit

Permalink
fix: sorting failing on missing key
Browse files Browse the repository at this point in the history
  • Loading branch information
eray-inuits committed Oct 18, 2024
1 parent 4ce325f commit f9e16d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/elody/object_configurations/base_object_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ def sort_keys(data):
return data

for key, value in self.document_info()["object_lists"].items():
document[key] = sorted(document[key], key=lambda property: property[value])
if document.get(key):
document[key] = sorted(
document[key], key=lambda property: property[value]
)
sort_keys(document)

def __build_nested_matcher(self, object_lists, keys_info, value, index=0):
Expand Down

0 comments on commit f9e16d8

Please sign in to comment.