Merge remote-tracking branch 'origin/develop' into develop

dev_aliyun
杨树明 5 years ago
commit 37cb03dee3

@ -20,6 +20,9 @@ module Mobile
expose :contact_name, if: ->(package, opts){ opts[:user].id == package.creator_id || opts[:user].admin? || opts[:user].business? }
expose :contact_phone, if: ->(package, opts){ opts[:user].id == package.creator_id || opts[:user].admin? || opts[:user].business? }
expose :updated_at do |package, _|
package.updated_at.try(:utc).try(:iso8601)
end
expose :deadline_at do |package, _|
package.deadline_at.try(:utc).try(:iso8601)
end

@ -42,7 +42,8 @@ class ProjectPackages::SaveService
private
def need_check_code?
(package.new_record? && params[:contact_phone] != package.creator.phone) || package.contact_phone != params[:contact_phone]
(package.new_record? && params[:contact_phone] != package.creator.phone) ||
(!package.new_record? && package.contact_phone != params[:contact_phone])
end
def check_code_valid!

Loading…
Cancel
Save