fix error for non admin user

This commit is contained in:
邱博亞 2023-11-04 09:50:52 +08:00
parent cde9364f76
commit 6dddde451d
1 changed files with 1 additions and 1 deletions

View File

@ -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