From 9fd6ea08b9c0bdc32788457bd6e6829f8211a8f9 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Wed, 5 Jun 2019 07:52:02 +0200 Subject: [PATCH] fix SubscriptionGroupValidator --- app/validators/subscription_group_validator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/validators/subscription_group_validator.rb b/app/validators/subscription_group_validator.rb index c35874719..33d2ce3e9 100644 --- a/app/validators/subscription_group_validator.rb +++ b/app/validators/subscription_group_validator.rb @@ -1,6 +1,6 @@ class SubscriptionGroupValidator < ActiveModel::Validator def validate(record) - return if record.statistic_profile.group_id == record.plan.group + return if record.statistic_profile.group_id == record.plan.group_id record.errors[:plan_id] << "This plan is not compatible with the current user's group" end