fix: seed_second_super_perm 去掉不存在的 UpdateTime
This commit is contained in:
1 parent
99d05d97c6
commit
e62f6c7b90
1 file changed
+2
-3
@@ -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}'))
|
||||
|
||||
|
||||
Reference in new issue
Block a user