Skip to content

Commit

Permalink
Do not send event in test env
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinisukale committed Dec 6, 2023
1 parent 65c3d60 commit 1c80eef
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 @@ -21,7 +21,7 @@ module Indexable
end

if instance_of?(DataciteDoi) || instance_of?(OtherDoi) || instance_of?(Doi)
if aasm_state == "findable"
if aasm_state == "findable" && !Rails.env.test?
# If following fields are modified or the state has changed (any other state to findable), send import message
if saved_change_to_attribute?("related_identifiers") || saved_change_to_attribute?("creators") || saved_change_to_attribute?("funding_references") || aasm_state_changed?
send_import_message(to_jsonapi)
Expand Down

0 comments on commit 1c80eef

Please sign in to comment.