Reload manager before ensuring owner is a manager

This commit is contained in:
Rob Harrington
2015-03-14 10:41:49 +11:00
parent d684a88697
commit cb28843af1

View File

@@ -360,7 +360,7 @@ class Enterprise < ActiveRecord::Base
end
def ensure_owner_is_manager
users << owner unless users.include?(owner) || owner.admin?
users << owner unless users(:reload).include?(owner) || owner.admin?
end
def enforce_ownership_limit