Loris icon indicating copy to clipboard operation
Loris copied to clipboard

[NDB_BVL_Instrument] Fix for clearing instrument

Open skarya22 opened this issue 1 year ago • 1 comments

Brief summary of changes

  • When running clear instrument on a non JSON instrument with non NULLABLE fields, it tries to set values to null which results in an error, this is resolved

Testing instructions (if applicable)

  1. Set a field of an instrument to NULLABLE = 'NO' in information_schema
  2. Try clearing the instrument with the LORIS API, see that it works now

CCNA OVERRIDE PR

skarya22 avatar Oct 15 '24 20:10 skarya22

I am confused.. how does an instrument get non-nullable fields? What is the value before data entry is done?

driusan avatar Oct 16 '24 13:10 driusan

I am confused.. how does an instrument get non-nullable fields? What is the value before data entry is done?

CommentID is a non-nullable field. When using the clear instrument function it results in an error as it tries to set the CommentID to null.

skarya22 avatar Oct 29 '24 13:10 skarya22

Should the check be and FIELD_NAME != CommentID then? I'm afraid of what might happen if a different column has a non-null constraint and it just doesn't get cleared but the user thinks it does. At least if there's an error they would know there's something that went wrong to report.

driusan avatar Oct 29 '24 17:10 driusan

@driusan Yeah I can change it to that

skarya22 avatar Oct 29 '24 19:10 skarya22