Skip to content

Commit

Permalink
Merge pull request #1133 from uktrade/KLS-1208-cms-content-activity-s…
Browse files Browse the repository at this point in the history
…tream

KLS-1208 - use char filter for pagination
  • Loading branch information
timothyPatterson authored Oct 4, 2023
2 parents 81863f9 + db5965e commit 4c1a651
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions activitystream/filters.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from django_filters import NumberFilter, FilterSet
from django_filters import CharFilter, FilterSet
from wagtail.models import Page


class ActivityStreamCMSContentFilter(FilterSet):
after = NumberFilter(method='filter_after')
after = CharFilter(method='filter_after')

def filter_after(self, queryset, name, value):
value = value or 0
value = value or '0'
return queryset.filter(id__gt=value)

class Meta:
Expand Down

0 comments on commit 4c1a651

Please sign in to comment.