Return dossiers on api with stable order

This commit is contained in:
Paul Chavard 2019-06-04 15:28:23 +02:00
parent 5624b5a997
commit d5911071f8
2 changed files with 2 additions and 1 deletions

View file

@ -45,7 +45,7 @@ class API::V1::DossiersController < APIController
render json: {}, status: :unauthorized
end
@dossiers = @procedure.dossiers.state_not_brouillon
@dossiers = @procedure.dossiers.state_not_brouillon.order_for_api
rescue ActiveRecord::RecordNotFound
render json: {}, status: :not_found