From c6116c30ba69880523b4455624ef2966942a425f Mon Sep 17 00:00:00 2001 From: Pierrick Brun Date: Tue, 29 Jan 2019 14:27:05 +0100 Subject: [PATCH] Revert "[FIX] Crash in base_user_role when role_id is not set on res.users.role.line" This reverts commit b537941d5a2d1fcb3fbacc602124c1b3f6e1d495. --- base_user_role/models/user.py | 5 ++--- base_user_role/views/user.xml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/base_user_role/models/user.py b/base_user_role/models/user.py index 6fe9133e8..9a10926ee 100644 --- a/base_user_role/models/user.py +++ b/base_user_role/models/user.py @@ -62,9 +62,8 @@ class ResUsers(models.Model): lambda rec: rec.is_enabled) for role_line in role_lines: role = role_line.role_id - if role: - group_ids.append(role.group_id.id) - group_ids.extend(role.implied_ids.ids) + group_ids.append(role.group_id.id) + group_ids.extend(role.implied_ids.ids) group_ids = list(set(group_ids)) # Remove duplicates IDs vals = { 'groups_id': [(6, 0, group_ids)], diff --git a/base_user_role/views/user.xml b/base_user_role/views/user.xml index a2582caf2..9a914625d 100644 --- a/base_user_role/views/user.xml +++ b/base_user_role/views/user.xml @@ -13,7 +13,7 @@ - +