mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
fix SubscriptionGroupValidator
This commit is contained in:
parent
4c033614ae
commit
9fd6ea08b9
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user