From 2227a592755bcedca621aa8e4f91c6b70f61fe48 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 20 Oct 2020 15:52:14 +0200 Subject: [PATCH] [bug] unable to rename a group containing users --- CHANGELOG.md | 1 + app/models/group.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d4bda6fd..8a7da1d2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fix a bug: unable to change the date formats using the setup script - Fix a bug: missing translation for projets drafts in public profile - Fix a bug: email notification after reservation update have wrong previous date (#234) +- Fix a bug: unable to rename a group containing users - Updated contribution guidelines - Updated summernote to 0.8.18 - Updated angular-summernote to 0.8.1 diff --git a/app/models/group.rb b/app/models/group.rb index 4c726a98d..bce93d058 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -15,7 +15,7 @@ class Group < ApplicationRecord friendly_id :name, use: :slugged validates :name, :slug, presence: true - validates :disabled, inclusion: { in: [false] }, if: :group_has_users? + validates :disabled, inclusion: { in: [false, nil] }, if: :group_has_users? after_create :create_prices after_create :create_statistic_subtype