Skip to content

Commit

Permalink
handle possibly missing reindex_extent=
Browse files Browse the repository at this point in the history
  • Loading branch information
aploshay committed Feb 9, 2024
1 parent 1c93344 commit 3a961e6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def create
attrs = create_attributes
init_attrs = { dynamic_schema_id: attrs[:dynamic_schema_id] } if attrs[:dynamic_schema_id].present? && klass.new.respond_to?(:dynamic_schema_id)
@object = klass.new(init_attrs)
object.reindex_extent = ::Hyrax::Adapters::NestingIndexAdapter::LIMITED_REINDEX
object.reindex_extent = ::Hyrax::Adapters::NestingIndexAdapter::LIMITED_REINDEX if defined?(::Hyrax::Adapters::NestingIndexAdapter) && object.respond_to?(:reindex_extent=)
run_callbacks :save do
run_callbacks :create do
klass == ::Collection ? create_collection(attrs) : work_actor.create(environment(attrs))
Expand Down

0 comments on commit 3a961e6

Please sign in to comment.