Bug 42002: Make 'replace' in screen_msg_regex not required
Default to empty string if null to ensure that leaving it blank produces the required outcome: the replace value is an empty string Signed-off-by: Marion Durand <marion.durand@biblibre.com> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
d294b2ce2a
commit
c420f23125
|
|
@ -845,7 +845,6 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "replace",
|
||||
required: true,
|
||||
indexRequired: true,
|
||||
type: "text",
|
||||
placeholder: "Welcome to your library!",
|
||||
|
|
@ -1025,6 +1024,15 @@ export default {
|
|||
account.convert_nonprinting_characters = null;
|
||||
}
|
||||
|
||||
if (account.screen_msg_regexs) {
|
||||
account.screen_msg_regexs = account.screen_msg_regexs.map(
|
||||
item => ({
|
||||
...item,
|
||||
replace: item.replace ?? "",
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
account.item_fields = account.item_fields?.map(
|
||||
({ account_id, account_item_field_id, ...rest }) => rest
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue