Bug 10190: (follow-up): fix: mtt formating: handle unset

This is needed to handle creating new triggers
for libraries for which all earlier triggers are
defaults (do not exist in the DB , are not explicitly set)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Chloe Zermatten 2026-03-24 10:01:19 +00:00 committed by Pedro Amorim
parent e4aecaa519
commit aa905b0801
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 4 additions and 0 deletions

View File

@ -413,6 +413,10 @@ export const useCircRulesStore = defineStore("circRules", () => {
async getSelectedRuleSet(context) {
const rawSelectedRuleSet =
await this.getRawSelectedRuleSet(context);
if (!rawSelectedRuleSet) {
return;
}
let formattedSelectedRuleSet = cloneDeep(rawSelectedRuleSet);
let i = 1;
while (i <= this.triggerCounts[this.currentLibraryId]) {