Skip to content

Commit

Permalink
Fix bug where adding an attribute crashes backend due to "" being a…
Browse files Browse the repository at this point in the history
… default
  • Loading branch information
bctcvai committed Dec 13, 2024
1 parent 34503ea commit b49e45e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/js/project-settings/attributes/attributes-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ export class AttributesForm extends TatorElement {

if (defaultVal !== null && defaultVal !== "null") {
// backend does this but not when value is ""
if (dtype == "int" || dtype == "float") {
if (dtype == "int" || dtype == "float" || dtype == "blob" || dtype == "string") {
if (String(defaultVal).trim() === "") {
delete formData["default"];
} else {
Expand Down

0 comments on commit b49e45e

Please sign in to comment.