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}'))