Section 1 & 2 - #Migration Run
This commit is contained in:
@@ -751,6 +751,19 @@ class ContentViewSet(SiteSectorModelViewSet):
|
||||
'source',
|
||||
]
|
||||
|
||||
def get_queryset(self):
|
||||
"""Override to support status__in filtering for multiple statuses"""
|
||||
queryset = super().get_queryset()
|
||||
|
||||
# Support status__in query param (comma-separated list of statuses)
|
||||
status_in = self.request.query_params.get('status__in', None)
|
||||
if status_in:
|
||||
statuses = [s.strip() for s in status_in.split(',') if s.strip()]
|
||||
if statuses:
|
||||
queryset = queryset.filter(status__in=statuses)
|
||||
|
||||
return queryset
|
||||
|
||||
def perform_create(self, serializer):
|
||||
"""Override to check monthly word limit and set account"""
|
||||
user = getattr(self.request, 'user', None)
|
||||
|
||||
Reference in New Issue
Block a user