Parse widget field list if is a string

pull/871/head
James Wynn 2 years ago
parent 5ecb9466ae
commit 02e9df8f28

@ -218,9 +218,11 @@ export function cleanServiceGroups(groups) {
wan // opnsense widget
} = cleanedService.widget;
const fieldsList = typeof fields === 'string' ? JSON.parse(fields) : fields;
cleanedService.widget = {
type,
fields: fields || null,
fields: fieldsList || null,
service_name: service.name,
service_group: serviceGroup.name,
};

Loading…
Cancel
Save