Skip to content

Commit

Permalink
Force null to empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoJokhan committed Nov 9, 2023
1 parent 7418e7a commit e739664
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/models/Idea.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ module.exports = function (db, sequelize, DataTypes) {
},
},
set: function (text) {
text = text ? sanitize.summary(text.trim()) : null;
text = text ? sanitize.summary(text.trim()) : '';
this.setDataValue('summary', text);
},
},
Expand Down Expand Up @@ -263,7 +263,7 @@ module.exports = function (db, sequelize, DataTypes) {
},
},
set: function (text) {
text = text ? sanitize.content(text.trim()) : null;
text = text ? sanitize.content(text.trim()) : '';
this.setDataValue('description', text);
},
},
Expand Down Expand Up @@ -318,7 +318,7 @@ module.exports = function (db, sequelize, DataTypes) {
},
allowNull: true,
set: function (text) {
text = text ? sanitize.content(text.trim()) : null;
text = text ? sanitize.content(text.trim()) : '';
this.setDataValue('modBreak', text);
},
},
Expand Down

1 comment on commit e739664

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Published new image: openstad/api:hotfix-set-null-value-to-emptystring-for-fields-e739664

Please sign in to comment.