From e62f6c7b9019837ca8c44b53851f2c5d3511e618 Mon Sep 17 00:00:00 2001 From: XingQue Date: Mon, 10 Aug 2026 07:53:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20seed=5Fsecond=5Fsuper=5Fperm=20=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=20UpdateTime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jituan/management/commands/seed_second_super_perm.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jituan/management/commands/seed_second_super_perm.py b/jituan/management/commands/seed_second_super_perm.py index f1569fa..0f9eea1 100644 --- a/jituan/management/commands/seed_second_super_perm.py +++ b/jituan/management/commands/seed_second_super_perm.py @@ -69,9 +69,9 @@ class Command(BaseCommand): perm.PermStatus = 1 changed = True if changed: - perm.UpdateTime = timezone.now() + # Permission 表只有 CreateTime,无 UpdateTime perm.save(update_fields=[ - 'PermName', 'PermDesc', 'PermCategory', 'PermStatus', 'UpdateTime', + 'PermName', 'PermDesc', 'PermCategory', 'PermStatus', ]) self.stdout.write(self.style.SUCCESS(' 已更新权限元数据')) else: @@ -87,7 +87,6 @@ class Command(BaseCommand): PermCategory=PERM_CATEGORY, PermStatus=1, CreateTime=timezone.now(), - UpdateTime=timezone.now(), ) self.stdout.write(self.style.SUCCESS(f' 已创建权限码: {PERM_CODE}'))