rancher check unique - pos free products check unique - 500 error handling

This commit is contained in:
2025-08-31 11:48:14 +03:30
parent 9d9d4d3b80
commit dd5be869c5
7 changed files with 61 additions and 64 deletions

View File

@@ -35,3 +35,13 @@ class QuotaLimitByOrganizationException(APIException):
status_code = status.HTTP_400_BAD_REQUEST
default_detail = "سازمان انتخاب شده در بین سامان های انتخاب شده برای توزیع سهمیه وجود ندارد" # noqa
default_code = 'error'
class FreePOSProductUniqueCheck(APIException):
"""
raise exception for free pos products to be unique
"""
status_code = status.HTTP_403_FORBIDDEN
default_detail = "محصول مورد نظر برای این دستگاه از قبل ثبت شده است" # noqa
default_code = 'error'