fix: redirection issues and instance validation changes
This commit is contained in:
parent
0ad8bf7664
commit
2ef3c06da0
14 changed files with 170 additions and 54 deletions
|
|
@ -21,6 +21,7 @@ from rest_framework.viewsets import ModelViewSet
|
|||
# Module imports
|
||||
from plane.utils.exception_logger import log_exception
|
||||
from plane.utils.paginator import BasePaginator
|
||||
from plane.authentication.session import BaseSessionAuthentication
|
||||
|
||||
|
||||
class TimezoneMixin:
|
||||
|
|
@ -49,6 +50,10 @@ class BaseViewSet(TimezoneMixin, ModelViewSet, BasePaginator):
|
|||
SearchFilter,
|
||||
)
|
||||
|
||||
authentication_classes = [
|
||||
BaseSessionAuthentication,
|
||||
]
|
||||
|
||||
filterset_fields = []
|
||||
|
||||
search_fields = []
|
||||
|
|
@ -146,6 +151,10 @@ class BaseAPIView(TimezoneMixin, APIView, BasePaginator):
|
|||
|
||||
search_fields = []
|
||||
|
||||
authentication_classes = [
|
||||
BaseSessionAuthentication,
|
||||
]
|
||||
|
||||
def filter_queryset(self, queryset):
|
||||
for backend in list(self.filter_backends):
|
||||
queryset = backend().filter_queryset(self.request, queryset, self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue