[FIX] base: ormcache invalidation in ir.config.parameter
Writing on a parameter invalidates the ormcache and propagates the invalidation to other workers. Setting a parameter to its current value should not trigger ormcache invalidations.
This commit is contained in:
@@ -83,7 +83,8 @@ class IrConfigParameter(models.Model):
|
||||
if param:
|
||||
old = param.value
|
||||
if value is not False and value is not None:
|
||||
param.write({'value': value})
|
||||
if str(value) != old:
|
||||
param.write({'value': value})
|
||||
else:
|
||||
param.unlink()
|
||||
return old
|
||||
|
||||
Reference in New Issue
Block a user