Skip to content

Commit

Permalink
refactor: apply suggestions from PR review #314
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Richards <[email protected]>
  • Loading branch information
VKTB and MRichards99 authored Feb 8, 2022
1 parent 5d6dab9 commit e7fa1b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datagateway_api/src/search_api/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def apply_filter(self, query):
# matters):
# {"Parameter": {"value": ["numericValue", "stringValue", "dateTimeValue"]}} # noqa: B950
if field_name == "value":
if isinstance(self.value, int) or isinstance(self.value, float):
if isinstance(self.value, (int, float)):
icat_field_name = icat_field_name[0]
elif isinstance(self.value, datetime):
icat_field_name = icat_field_name[2]
Expand Down

0 comments on commit e7fa1b1

Please sign in to comment.