Skip to content

Commit

Permalink
[NDB_BVL_Instrument] Fix for clearing instrument (aces#9411)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
skarya22 authored Oct 30, 2024
1 parent 3c1baff commit b759608
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion php/libraries/NDB_BVL_Instrument.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2644,7 +2644,7 @@ abstract class NDB_BVL_Instrument extends NDB_Page
if (!$this->jsonData) {
$columns = $db->pselect(
"SELECT COLUMN_NAME FROM information_schema.columns
WHERE TABLE_NAME=:table AND TABLE_SCHEMA=:db",
WHERE COLUMN_NAME<>'CommentID' AND TABLE_NAME=:table AND TABLE_SCHEMA=:db",
[
'table' => $this->table,
'db' => $dbconfig['database'],
Expand Down

0 comments on commit b759608

Please sign in to comment.