fix(system.model): fixed Dictionary/SystemConfig model's delete method
parent
d4e0563eb1
commit
cdb07c5c23
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue