Skip to content

Commit

Permalink
fix: fix ignore_extra_sizes method
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Nov 14, 2024
1 parent 9dd2530 commit bcc0e9b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions openfoodfacts_exports/exports/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,10 @@ def ignore_extra_sizes(self):
"""Literal doesn't accept extra values, returning an error in case of
additional keys.
"""
self.sizes = {
k: v for k, v in self.sizes.items() if k in ALLOWED_IMAGE_SIZE_KEYS
}
if self.sizes:
self.sizes = {
k: v for k, v in self.sizes.items() if k in ALLOWED_IMAGE_SIZE_KEYS
}
return self

@model_validator(mode="before")
Expand Down

0 comments on commit bcc0e9b

Please sign in to comment.