diff --git a/golem_activity_session_registration/models/golem_activity_session_registration.py b/golem_activity_session_registration/models/golem_activity_session_registration.py index 4c78c63..2525a90 100644 --- a/golem_activity_session_registration/models/golem_activity_session_registration.py +++ b/golem_activity_session_registration/models/golem_activity_session_registration.py @@ -53,13 +53,13 @@ class GolemMember(models.Model): for r in rids: # == 2 is removal case r_removed.append(r) if r[0] == 2 else r_keep.append(r) rObj = self.env['golem.activity.session.registration'] - for r in r_removed: - r = rObj.browse([r[1]]) + for rem in r_removed: + r = rObj.browse([rem[1]]) # if already canceled, let it be removed, else cancel it if r.state != 'canceled': r.state = 'canceled' else: - r_keep.append(r) + r_keep.append(rem) values['activity_session_registration_ids'] = r_keep return super(GolemMember, self).write(values)