fix: remove intFields hack and update db.parseIntFields to only parseInt if field value is a number

This commit is contained in:
Julian Lam
2024-03-06 11:45:29 -05:00
parent cda25bb646
commit f368a1a87f
5 changed files with 10 additions and 26 deletions

View File

@@ -205,12 +205,7 @@ module.exports = function (User) {
return;
}
const _intFields = [...intFields];
if (activitypub.helpers.isUri(user.uid)) {
_intFields.splice(_intFields.indexOf('uid'), 1);
}
db.parseIntFields(user, _intFields, requestedFields);
db.parseIntFields(user, intFields, requestedFields);
if (user.hasOwnProperty('username')) {
parseDisplayName(user, uidToSettings);