add company code to organization serialzier & handle quota weight exception

This commit is contained in:
2025-06-16 09:08:01 +03:30
parent 8df059bee9
commit 05b46a82b1
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
from rest_framework.exceptions import APIException
from rest_framework import status
class QuotaWeightException(APIException):
""" if quota distributions weight is more """
status_code = status.HTTP_401_UNAUTHORIZED
default_detail = ''
default_code = 'unauthorized'