修復owners nil錯誤

This commit is contained in:
邱博亞 2023-10-18 22:01:09 +08:00
parent 6ad48313ed
commit cde9364f76
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ class PropertyHiresController < ApplicationController
"value" => property.purchase_date.strftime("%Y-%m-%d")
}
end
if property.owners.empty?
if property.owners.blank?
owners = property.other_owner
else
owners = property.owner_profiles.collect{|mp| mp.name}.join(",")