Skip to content

Commit

Permalink
jm-dict or empty dict
Browse files Browse the repository at this point in the history
Co-authored-by: Jozef Misutka <[email protected]>
  • Loading branch information
Paurikova2 and vidiecan authored Nov 14, 2024
1 parent fe9e65e commit f504bda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pump/_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def filter_res_d(self, res_d, ignored_mtd_fields):
"""
Filter the resulting res_d dictionary based on custom ignored metadata fields.
"""
return {key: val for key, val in res_d.items() if res_d is not None and key not in ignored_mtd_fields}
return {key: val for key, val in (res_d or {}).items() if key not in ignored_mtd_fields}

def value(self, res_type_id: int, res_id: int, text_for_field_id: int = None, log_missing: bool = True):
"""
Expand Down

0 comments on commit f504bda

Please sign in to comment.