fix - ordering organization type
This commit is contained in:
@@ -210,6 +210,12 @@ class OrganizationTypeViewSet(SoftDeleteMixin, ModelViewSet):
|
|||||||
queryset = OrganizationType.objects.all()
|
queryset = OrganizationType.objects.all()
|
||||||
serializer_class = OrganizationTypeSerializer
|
serializer_class = OrganizationTypeSerializer
|
||||||
|
|
||||||
|
def list(self, request, *args, **kwargs):
|
||||||
|
""" all organization type """
|
||||||
|
queryset = self.get_queryset().order_by('-modify_date')
|
||||||
|
serializer = self.serializer_class(queryset, many=True)
|
||||||
|
return Response(serializer.data, status=status.HTTP_200_OK)
|
||||||
|
|
||||||
|
|
||||||
class OrganizationViewSet(BaseViewSet, SoftDeleteMixin, ModelViewSet, DynamicSearchMixin):
|
class OrganizationViewSet(BaseViewSet, SoftDeleteMixin, ModelViewSet, DynamicSearchMixin):
|
||||||
""" Crud operations for organization model """ #
|
""" Crud operations for organization model """ #
|
||||||
|
|||||||
@@ -309,3 +309,6 @@ django.core.exceptions.FieldError: Unsupported lookup 'name' for ForeignKey or j
|
|||||||
[2025-10-28 10:24:56,044] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\api.py changed, reloading.
|
[2025-10-28 10:24:56,044] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\api.py changed, reloading.
|
||||||
[2025-10-28 10:25:01,182] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
[2025-10-28 10:25:01,182] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
||||||
[2025-10-28 13:50:35,064] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authorization\api\v1\api.py changed, reloading.
|
[2025-10-28 13:50:35,064] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authorization\api\v1\api.py changed, reloading.
|
||||||
|
[2025-10-28 13:50:37,425] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
||||||
|
[2025-10-28 13:53:02,285] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\api.py changed, reloading.
|
||||||
|
[2025-10-28 13:53:05,015] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader
|
||||||
|
|||||||
Reference in New Issue
Block a user