diff --git a/app/controllers/api/v1/participant_declarations_controller.rb b/app/controllers/api/v1/participant_declarations_controller.rb index 93817b4eff..b1347569ea 100644 --- a/app/controllers/api/v1/participant_declarations_controller.rb +++ b/app/controllers/api/v1/participant_declarations_controller.rb @@ -71,7 +71,7 @@ def participant_declaration_query_scope end def participant_declaration_for_lead_provider - @participant_declaration_for_lead_provider ||= ParticipantDeclaration.for_lead_provider(cpd_lead_provider).find(params[:id]) + @participant_declaration_for_lead_provider ||= ParticipantDeclaration::ECF.for_lead_provider(cpd_lead_provider).find(params[:id]) end def permitted_params diff --git a/app/controllers/api/v3/participant_declarations_controller.rb b/app/controllers/api/v3/participant_declarations_controller.rb index f9a6f5f2d7..807cff3bcb 100644 --- a/app/controllers/api/v3/participant_declarations_controller.rb +++ b/app/controllers/api/v3/participant_declarations_controller.rb @@ -99,7 +99,7 @@ def participant_declaration_from_query end def participant_declaration_for_lead_provider - @participant_declaration_for_lead_provider ||= ParticipantDeclaration.for_lead_provider(cpd_lead_provider).find(params[:id]) + @participant_declaration_for_lead_provider ||= ParticipantDeclaration::ECF.for_lead_provider(cpd_lead_provider).find(params[:id]) end def serializer_class