Skip to content

Commit

Permalink
Force index of prefix when indexing provider or client prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhallett committed Jan 15, 2021
1 parent 27f3587 commit 7bd09a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/models/concerns/indexable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ module Indexable
IndexJob.perform_later(self)
else
__elasticsearch__.index_document
# This is due to the order of indexing, we want to always ensure
# the prefix index is up to date with relations
# So we force it here to reindex prefix if we touch them.
if ["ProviderPrefix", "ClientPrefix"].include?(self.class.name)
self.prefix.__elasticsearch__.index_document
end
end

if (
Expand Down

0 comments on commit 7bd09a2

Please sign in to comment.