[FIX] models: correct regex for onchange_v7

Ensure, we only match the expected az-A-Z characters for old-style
onchanges.
The \w allowed starting with 0-9 which should be prevented.
This commit is contained in:
Raphael Collet
2018-07-12 13:55:42 +02:00
parent e9624a8460
commit a1b92ad2b8
+1 -1
View File
@@ -61,7 +61,7 @@ _unlink = logging.getLogger(__name__ + '.unlink')
regex_order = re.compile('^(\s*([a-z0-9:_]+|"[a-z0-9:_]+")(\s+(desc|asc))?\s*(,|$))+(?<!,)$', re.I)
regex_object_name = re.compile(r'^[a-z0-9_.]+$')
regex_pg_name = re.compile(r'^[a-z_][a-z0-9_$]*$', re.I)
onchange_v7 = re.compile(r"^(\w+)\((.*)\)$")
onchange_v7 = re.compile(r"^([a-zA-Z]\w+)\((.*)\)$")
AUTOINIT_RECALCULATE_STORED_FIELDS = 1000