Skip to content

Commit

Permalink
Fix: use Sample.where instead of project.samples in ProjectSamplesRes…
Browse files Browse the repository at this point in the history
…olver
  • Loading branch information
ericenns committed Sep 17, 2024
1 parent e02746c commit d9afaff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/graphql/resolvers/project_samples_resolver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ProjectSamplesResolver < BaseResolver
default_value: nil

def resolve(filter:, order_by:)
ransack_obj = project.samples.ransack(filter&.to_h)
ransack_obj = Sample.where(project_id: project.id).ransack(filter&.to_h)
ransack_obj.sorts = ["#{order_by.field} #{order_by.direction}"] if order_by.present?

ransack_obj.result
Expand Down

0 comments on commit d9afaff

Please sign in to comment.