fix error for non admin user
This commit is contained in:
parent
cde9364f76
commit
6dddde451d
|
@ -568,7 +568,7 @@ class Property
|
|||
end
|
||||
def can_be_hired_frontend
|
||||
user = OrbitHelper.current_user
|
||||
self.can_be_hired || (user && (user.is_admin? || property.owners.include?(user.member_profile_id)))
|
||||
self.can_be_hired || (user && (user.is_admin? || (self.owners && self.owners.include?(user.member_profile_id))))
|
||||
end
|
||||
def can_be_show_frontend
|
||||
user = OrbitHelper.current_user
|
||||
|
|
Loading…
Reference in New Issue