diff --git a/INSIGHTSAPI/requirements.txt b/INSIGHTSAPI/requirements.txt index d0edfc8..91bac5f 100644 --- a/INSIGHTSAPI/requirements.txt +++ b/INSIGHTSAPI/requirements.txt @@ -1,6 +1,6 @@ celery==5.4.0 chardet==5.2.0 -Django==5.0.7 +Django==5.1.3 django_auth_ldap==4.8.0 django-cors-headers==4.4.0 django_sendfile2==0.7.1 diff --git a/INSIGHTSAPI/sgc/views.py b/INSIGHTSAPI/sgc/views.py index 7745b3c..037115b 100644 --- a/INSIGHTSAPI/sgc/views.py +++ b/INSIGHTSAPI/sgc/views.py @@ -3,9 +3,7 @@ import logging from django.core.cache import cache from django.utils.decorators import method_decorator -from django.views.decorators.cache import cache_page, cache_control -from django.utils.cache import get_cache_key -from rest_framework import renderers +from django.views.decorators.cache import cache_page from rest_framework.permissions import IsAuthenticated, DjangoModelPermissions from rest_framework import viewsets from services.views import FileDownloadMixin @@ -23,7 +21,6 @@ class SGCFileViewSet(viewsets.ModelViewSet): queryset = SGCFile.objects.all().select_related("area") serializer_class = SGCFileSerializer - # renderer_classes = [renderers.BrowsableAPIRenderer] permission_classes = [IsAuthenticated, DjangoModelPermissions] @method_decorator(cache_page(CACHE_DURATION, key_prefix="sgc")) diff --git a/INSIGHTSAPI/vacation/views.py b/INSIGHTSAPI/vacation/views.py index 4eb717c..6c048f7 100644 --- a/INSIGHTSAPI/vacation/views.py +++ b/INSIGHTSAPI/vacation/views.py @@ -32,11 +32,11 @@ def get_queryset(self): # If the user is a manager of HR if user.job_position.name == "GERENTE DE GESTION HUMANA": - return self.queryset + return self.queryset.all() # If the user has payroll approval permissions elif user.has_perm("vacation.payroll_approval"): - return self.queryset + return self.queryset.all() # If the user has a management position with rank >= 2 elif user.job_position.rank >= 2: