Convert rule domain for _write and _delete without active test

We must convert in ModelSQL.read the rule domains like the ModelSQL.write and
ModelSQL.delete convert their rule without the active test to have the same
result.

issue9819
review300951006
This commit is contained in:
Cédric Krier committed 2020-11-23 23:43:01 +01:00
1 parent 1fd888b83e
commit 4f83dff439
1 file changed
+2 -2
+2 -2
View File
@@ -741,11 +741,11 @@ class ModelSQL(ModelStorage):
if rule_domain:
rule_tables = {None: (table, None)}
rule_tables, rule_expression = cls.search_domain(
rule_domain, tables=rule_tables)
rule_domain, active_test=False, tables=rule_tables)
if len(rule_tables) > 1:
# The expression uses another table
rule_tables, rule_expression = cls.search_domain(
rule_domain)
rule_domain, active_test=False)
rule_from = convert_from(None, rule_tables)
rule_table, _ = rule_tables[None]
rule_where = rule_table.id == table.id