Skip to content

Conversation

@skarya22
Copy link
Contributor

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

@driusan
Copy link
Collaborator

driusan commented Oct 16, 2024

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

@skarya22
Copy link
Contributor Author

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.

@driusan
Copy link
Collaborator

driusan commented Oct 29, 2024

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.

@skarya22
Copy link
Contributor Author

@driusan Yeah I can change it to that

@driusan driusan merged commit b759608 into aces:main Oct 30, 2024
9 of 10 checks passed
ZhichGaming pushed a commit to ZhichGaming/Loris that referenced this pull request Nov 25, 2024
Ignore commentID when clearing instrument.

When running clear instrument on a non JSON instrument the commentID
primary key is non-nullable, which it tries to set values to null which results in an
error, this is resolved.

Ignore CommentID when clearing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants