fix(system.model): fixed Dictionary/SystemConfig model's delete method

pull/60/head
Angelo 2022-05-25 19:27:36 +08:00
parent d4e0563eb1
commit cdb07c5c23
1 changed files with 6 additions and 1 deletions

View File

@ -188,6 +188,11 @@ class Dictionary(CoreModel):
super().save(force_insert, force_update, using, update_fields)
dispatch.refresh_dictionary() # 有更新则刷新字典配置
def delete(self, using=None, keep_parents=False):
res = super().delete(using, keep_parents)
dispatch.refresh_dictionary()
return res
class OperationLog(CoreModel):
request_modular = models.CharField(max_length=64, verbose_name="请求模块", null=True, blank=True, help_text="请求模块")
@ -323,7 +328,7 @@ class SystemConfig(CoreModel):
def delete(self, using=None, keep_parents=False):
res = super().delete(using, keep_parents)
dispatch.refresh_dictionary()
dispatch.refresh_system_config()
return res