Compare commits
2 Commits
ee7f3ffea3
...
c584df814f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c584df814f | ||
|
|
206e051817 |
@ -204,7 +204,11 @@ class ShelfViewSet(viewsets.ViewSet):
|
||||
except StoryShelf.DoesNotExist:
|
||||
return error(code=ErrorCode.SHELF_NOT_FOUND, message='书架不存在')
|
||||
|
||||
with transaction.atomic():
|
||||
try:
|
||||
Story.objects.filter(shelf=shelf).update(shelf=None)
|
||||
except Exception:
|
||||
Story.objects.filter(shelf=shelf).delete()
|
||||
shelf.delete()
|
||||
return success(message='删除成功')
|
||||
|
||||
|
||||
@ -32,8 +32,9 @@ def report_to_log_center(exc, context):
|
||||
|
||||
payload = {
|
||||
"project_id": "rtc_backend",
|
||||
"environment": os.environ.get('ENVIRONMENT', 'production'),
|
||||
"environment": os.environ.get('ENVIRONMENT', 'development'),
|
||||
"level": "ERROR",
|
||||
"repo_url": "https://gitea.airlabs.art/zyc/rtc_backend.git",
|
||||
"error": {
|
||||
"type": type(exc).__name__,
|
||||
"message": str(exc),
|
||||
|
||||
@ -47,8 +47,9 @@ def _report_exception(exc, request):
|
||||
|
||||
payload = {
|
||||
"project_id": "rtc_backend",
|
||||
"environment": os.environ.get('ENVIRONMENT', 'production'),
|
||||
"environment": os.environ.get('ENVIRONMENT', 'development'),
|
||||
"level": "ERROR",
|
||||
"repo_url": "https://gitea.airlabs.art/zyc/rtc_backend.git",
|
||||
"error": {
|
||||
"type": type(exc).__name__,
|
||||
"message": str(exc),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user