Skip to content

Commit f4810b0

Browse files
committed
update boolean handling to return true or false instead of 1 or 0
1 parent d9d6d60 commit f4810b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adminforth/dataConnectors/mongo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class MongoConnector extends AdminForthBaseConnector implements IAdminForthDataS
108108
return dayjs(value).toISOString();
109109
}
110110
} else if (field.type == AdminForthDataTypes.BOOLEAN) {
111-
return value === null ? null : (value ? 1 : 0);
111+
return value === null ? null : (value ? true : false);
112112
} else if (field.type == AdminForthDataTypes.DECIMAL) {
113113
return Decimal128.fromString(value?.toString());
114114
}

0 commit comments

Comments
 (0)