-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Scoring not run when instrument saved from the API #7460
Comments
If there is scoring happening then I think it should be a post request. But, the documentation clearly state what is to be expected when a score field is provided in the request body: |
Is the same fix expected for PATCH requests as well? |
I believe that POST is not supported for ... /candidates/$CandID/$VisitLabel/instruments/$InstrumentName. To clarify, the issue occurs with a PUT or PATCH request without any Score fields provided in the request body. I expected the PUT or PATCH to run the scoring function, using the data that is loaded in the different fields to calculate scores and populate the score fields. The API documentation actually does not mention that a PUT/PATCH request runs the score function, so it should be added, I guess. (Yes, for both PUT and PATCH requests) |
Why should it be a I would expect the same behaviour from |
This is currently what the instrument endpoint does. I see 2 options here
I think #1 is the way to go but the potential issue with it is that the |
Option 1 will not work.
(the else handles printing an error if validation fails). All it does is wrap Quick/LorisForm's validate function and call |
So we should probable reproduce the functionality of save in the API class |
Yes. |
Describe the bug
When a
PUT
request is handled to save instrument data for the API, it calls the_save
function. This bypasses the scoring, which is done through the front end withsave
(no underscore).To Reproduce
Save an instrument which uses scoring with the API. Look in frontend to see if scoring was run.
What did you expect to happen?
Scoring should happen.
The text was updated successfully, but these errors were encountered: