+ Telegram bot: sign up, sign in, notifications + Anonymous users can't see yuan_rate_commission * Only logged in customers can create/update orders * Customer info migrated to separate User model * Renamed legacy fields in serializers * Cleanup in API classes
13 lines
314 B
Python
13 lines
314 B
Python
from rest_framework import status
|
|
from rest_framework.exceptions import APIException
|
|
|
|
|
|
class CRMException(APIException):
|
|
status_code = status.HTTP_400_BAD_REQUEST
|
|
|
|
def __init__(self, detail=None):
|
|
if detail is None:
|
|
detail = self.default_detail
|
|
|
|
self.detail = {'error': detail}
|