import - service area in organization & validate in org rancher link
This commit is contained in:
@@ -15,3 +15,22 @@ class DuplicateRancherException(APIException):
|
||||
class HerdCapacityException(APIException):
|
||||
status_code = status.HTTP_403_FORBIDDEN
|
||||
default_detail = "مقدار حجم سبک و سنگین وارد شده از ظرفیت گله بیشتر میباشد" # noqa
|
||||
|
||||
|
||||
class HerdException(APIException):
|
||||
""" if quota is not available """
|
||||
|
||||
status_code = status.HTTP_400_BAD_REQUEST
|
||||
default_detail = "خطا در اطلاعات گله" # noqa
|
||||
default_code = 'error'
|
||||
|
||||
def __init__(self, message=None, status_code=None, code=None):
|
||||
if status_code is not None:
|
||||
self.status_code = status_code
|
||||
|
||||
detail = {
|
||||
"message": message,
|
||||
"status_code": status_code
|
||||
}
|
||||
|
||||
super().__init__(detail)
|
||||
|
||||
Reference in New Issue
Block a user