fix(api): do not try to transform empty values passed to user notificationTypes

fixes #1501
pull/1478/head
sct 4 years ago
parent 48587719e9
commit ef3f9778aa
No known key found for this signature in database
GPG Key ID: 77D146606D30DCCD

@ -86,7 +86,11 @@ export class UserSettings {
return values; return values;
}, },
to: (value: Partial<NotificationAgentTypes>): string => { to: (value: Partial<NotificationAgentTypes>): string | null => {
if (!value || typeof value !== 'object') {
return null;
}
const allowedKeys = Object.values(NotificationAgentKey); const allowedKeys = Object.values(NotificationAgentKey);
// Remove any unknown notification agent keys before saving to db // Remove any unknown notification agent keys before saving to db

Loading…
Cancel
Save