add some new data to device login data, first part of broker to stake holders assignment

This commit is contained in:
2025-08-27 17:04:55 +03:30
parent 65c831d6a8
commit 680a469839
18 changed files with 167 additions and 46 deletions

View File

@@ -0,0 +1,14 @@
from rest_framework import status
from rest_framework.response import Response
class SoftDeleteMixin:
def destroy(self, request, *args, **kwargs):
""" override destroy -> soft delete """
instance = self.get_object() # noqa
instance.soft_delete()
return Response(
{"detail": "رکورد با موفقیت حذف شد (Soft Delete)."},
status=status.HTTP_200_OK
)