Skip to content

Commit 770ae3c

Browse files
committed
fix: update boolean value handling in PostgresConnector to return true/false instead of 1/0
1 parent edca1e3 commit 770ae3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adminforth/dataConnectors/postgres.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class PostgresConnector extends AdminForthBaseConnector implements IAdminForthDa
232232
}
233233
return JSON.stringify(value);
234234
} else if (field.type == AdminForthDataTypes.BOOLEAN) {
235-
return value === null ? null : (value ? 1 : 0);
235+
return value === null ? null : (value ? true : false);
236236
} else if (field.type == AdminForthDataTypes.JSON) {
237237
if (field._underlineType == 'json') {
238238
return typeof value === 'string' || value === null ? value : JSON.stringify(value);

0 commit comments

Comments
 (0)