[IMP] web_editor: cleanup channels regex
Model pattern was too permissive, separator is the literal `.` character, not any random thing. Also remove unnecessary bracket expression, it's unnecessary when matching a single item. OPW-2836106 closes odoo/odoo#90107 X-original-commit: 320cdb4e85cb86915fa25cfda8f17e0a372e765e Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com> Signed-off-by: Raphael Collet <rco@odoo.com>
This commit is contained in:
@@ -18,8 +18,8 @@ class EditorCollaborationController(BusController):
|
||||
channels = list(channels)
|
||||
for channel in channels:
|
||||
if isinstance(channel, str):
|
||||
match = re.match(r'editor_collaboration:(\w+(?:.\w+)*):(\w+):([\d]+)', channel)
|
||||
if (match):
|
||||
match = re.match(r'editor_collaboration:(\w+(?:\.\w+)*):(\w+):(\d+)', channel)
|
||||
if match:
|
||||
model_name = match[1]
|
||||
field_name = match[2]
|
||||
res_id = int(match[3])
|
||||
|
||||
Reference in New Issue
Block a user