Skip to content

Commit

Permalink
fix: empty strings in webpage. Solves issue #7
Browse files Browse the repository at this point in the history
  • Loading branch information
EvaMart committed Dec 4, 2024
1 parent 0c50538 commit ed2838d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
Binary file modified app/models/__pycache__/instance.cpython-310.pyc
Binary file not shown.
5 changes: 5 additions & 0 deletions app/models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ def filter_empty_publication(cls, v):
if filtered_v:
return [p for p in filtered_v if p != {}]
return filtered_v

# Filter empty strings and non-valid entries in the webpage field
@field_validator('webpage', mode='before')
def filter_empty_webpage(cls, v):
return remove_nones_empty_string(v)

# Set super_type based on whether the instance is part of web_types
def set_super_type(self, web_types: List[str]):
Expand Down
Binary file modified app/services/__pycache__/a_indicators.cpython-310.pyc
Binary file not shown.
Binary file modified app/tests/__pycache__/test_compA1_3.cpython-310-pytest-7.4.4.pyc
Binary file not shown.

0 comments on commit ed2838d

Please sign in to comment.