Skip to content

Commit

Permalink
Use previously_new_record? as I saw staging gives milisencond diff fo…
Browse files Browse the repository at this point in the history
…r created and updated datetime
  • Loading branch information
ashwinisukale committed Jan 10, 2024
1 parent 045db70 commit 20ffcea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/concerns/indexable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module Indexable
if aasm_state == "findable"
changed_attributes = saved_changes
relevant_changes = changed_attributes.keys & %w[related_identifiers creators funding_references aasm_state]
if relevant_changes.any? || (created == updated)
if relevant_changes.any? || previously_new_record?
send_import_message(to_jsonapi)
Rails.logger.info "[Event Data Import Message] State: #{aasm_state} Params: #{to_jsonapi} message sent to Event Data service."
end
Expand Down

0 comments on commit 20ffcea

Please sign in to comment.