From 08a5faee7963705bb670f7fa5c368a0ab8e537f8 Mon Sep 17 00:00:00 2001 From: idss-haitun <9288407+idss-haitun@user.noreply.gitee.com> Date: Wed, 27 Jul 2022 07:24:51 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E9=80=BB=E8=BE=91=20DRFAPIException=E5=92=8Cexceptions.APIExce?= =?UTF-8?q?ption=E5=BA=94=E8=AF=A5=E6=98=AF=E5=90=8C=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=EF=BC=8C=E5=A6=82=E6=9E=9C=E8=BF=99=E9=87=8C?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E5=88=A4=E6=96=AD=E6=98=AF=E6=9C=89=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0=E7=9A=84=EF=BC=8C=E8=AF=B7=E5=BF=BD=E7=95=A5=E6=9C=AC?= =?UTF-8?q?=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/dvadmin/utils/exception.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/backend/dvadmin/utils/exception.py b/backend/dvadmin/utils/exception.py index 122e156..b9d2d51 100644 --- a/backend/dvadmin/utils/exception.py +++ b/backend/dvadmin/utils/exception.py @@ -10,7 +10,6 @@ import logging import traceback from django.db.models import ProtectedError -from rest_framework import exceptions from rest_framework.exceptions import APIException as DRFAPIException, AuthenticationFailed from rest_framework.views import set_rollback @@ -37,9 +36,6 @@ def CustomExceptionHandler(ex, context): elif isinstance(ex, DRFAPIException): set_rollback() msg = ex.detail - elif isinstance(ex, exceptions.APIException): - set_rollback() - msg = ex.detail elif isinstance(ex, ProtectedError): set_rollback() msg = "删除失败:该条数据与其他数据有相关绑定" From dc1e8567703238ff33aa586c875038779654d12b Mon Sep 17 00:00:00 2001 From: thu_renyi <630362055@qq.com> Date: Sun, 14 Aug 2022 07:03:56 +0000 Subject: [PATCH 2/2] =?UTF-8?q?update=20web/src/layout/header-aside/layout?= =?UTF-8?q?.vue.=20=E5=B8=A6=E5=8F=82=E6=95=B0=E7=9A=84=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E9=87=8C=E7=9A=84fullpath=E5=BA=94=E8=AF=A5?= =?UTF-8?q?=E6=94=B9=E4=B8=BAfullPath=EF=BC=8C=E5=90=A6=E5=88=99=E4=B8=8D?= =?UTF-8?q?=E8=B5=B7=E4=BD=9C=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: thu_renyi <630362055@qq.com> --- web/src/layout/header-aside/layout.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/layout/header-aside/layout.vue b/web/src/layout/header-aside/layout.vue index 68e114f..c224929 100644 --- a/web/src/layout/header-aside/layout.vue +++ b/web/src/layout/header-aside/layout.vue @@ -160,8 +160,8 @@ export default { routerViewKey () { // 默认情况下 key 类似 __transition-n-/foo // 这里的字符串操作是为了最终 key 的格式和原来相同 类似 __transition-n-__stamp-time-/foo - const stamp = this.$route.meta[`__stamp-${this.$route.fullpath}`] || '' - return `${stamp ? `__stamp-${stamp}-` : ''}${this.$route.fullpath}` + const stamp = this.$route.meta[`__stamp-${this.$route.fullPath}`] || '' + return `${stamp ? `__stamp-${stamp}-` : ''}${this.$route.fullPath}` }, /** * @description 最外层容器的背景图片样式