Skip to content

Commit

Permalink
Life is ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
hblankenship committed Jan 16, 2025
1 parent 59a5669 commit 1bcf3a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dojo/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1556,9 +1556,10 @@ def filter_mitigated_on(self, queryset, name, value):
# we have a simple date without a time, lets get a range from this morning to tonight at 23:59:59:999
nextday = value + timedelta(days=1)
return queryset.filter(mitigated__gte=value, mitigated__lt=nextday)

return queryset.filter(mitigated=value)


class PercentageFilter(NumberFilter):
def __init__(self, *args, **kwargs):
kwargs["method"] = self.filter_percentage
Expand Down Expand Up @@ -1730,9 +1731,10 @@ def filter_mitigated_on(self, queryset, name, value):
# we have a simple date without a time, lets get a range from this morning to tonight at 23:59:59:999
nextday = value + timedelta(days=1)
return queryset.filter(mitigated__gte=value, mitigated__lt=nextday)

return queryset.filter(mitigated=value)


class FindingFilterWithoutObjectLookups(FindingFilterHelper, FindingTagStringFilter):
test__engagement__product__prod_type = NumberFilter(widget=HiddenInput())
test__engagement__product = NumberFilter(widget=HiddenInput())
Expand Down

0 comments on commit 1bcf3a7

Please sign in to comment.