修复了影响生产环境的问题,在生产环境中成功运行
This commit is contained in:
@@ -67,6 +67,8 @@ def custom_exception_handler(exc, context):
|
||||
f"错误类型: {type(exc).__name__}, 错误: {str(exc)}"
|
||||
)
|
||||
if not settings.DEBUG:
|
||||
import traceback
|
||||
print(traceback.format_exc())
|
||||
return Response(
|
||||
{'code': 500, 'message': '服务器内部错误,请稍后重试'},
|
||||
status=status.HTTP_500_INTERNAL_SERVER_ERROR
|
||||
|
||||
@@ -57,7 +57,7 @@ def check_fadan_qiangdan_eligible(yonghuid: str, action_type: int) -> tuple:
|
||||
import logging
|
||||
from django.db import transaction
|
||||
from decimal import Decimal
|
||||
from dingdan.models import Fadan, FadanFenhong, FadanFenhongLilv
|
||||
from orders.models import Fadan, FadanFenhong, FadanFenhongLilv
|
||||
|
||||
logger = logging.getLogger('xiaochengxu')
|
||||
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
Reference in New Issue
Block a user