Fix quote

This commit is contained in:
KMY 2023-10-02 13:54:54 +09:00
parent ee406e6fb9
commit 926f1df1a9

View file

@ -128,7 +128,7 @@ class ProcessReferencesService < BaseService
statuses.each do |status|
attribute_type = quote_status_ids.include?(status.id) ? 'QT' : @attributes[status.id]
attribute_type = 'BT' unless quotable?(status)
quote_type = attribute_type.present? ? attribute_type.casecmp('QT').zero? : false
quote_type = attribute_type.present? ? (attribute_type.casecmp('QT').zero? || attribute_type.casecmp('RE').zero?) : false
@status.quote_of_id = status.id if quote_type && (@status.quote_of_id.nil? || references.exclude?(@status.quote_of_id))
@added_objects << @status.reference_objects.new(target_status: status, attribute_type: attribute_type, quote: quote_type)