Skip to content

Commit

Permalink
Fix issue with relationship sorts due to missing join_manager (#1443)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgebhardt authored Jan 26, 2024
1 parent f75acdb commit 07888a9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/jsonapi/active_relation_retrieval_v09.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ def find_fragments(filters, options = {})
filters: filters,
sort_criteria: sort_criteria)

options[:_relation_helper_options] = { join_manager: join_manager, sort_fields: [] }
options[:_relation_helper_options] = {
context: context,
join_manager: join_manager,
sort_fields: []
}

include_directives = options[:include_directives]

records = records(options)
Expand All @@ -116,7 +121,7 @@ def find_fragments(filters, options = {})

records = filter_records(records, filters, options)

records = sort_records(records, order_options, context)
records = sort_records(records, order_options, options)

records = apply_pagination(records, options[:paginator], order_options)

Expand Down

0 comments on commit 07888a9

Please sign in to comment.