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