Skip to content

Commit

Permalink
fix: Cache reset check failing in some situations
Browse files Browse the repository at this point in the history
The array was being accessed by index instead of the ID. Radarr props index & id do not align due to skipping id 1.
  • Loading branch information
benscobie committed Dec 5, 2024
1 parent 19d8f44 commit 47ed347
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/src/modules/rules/rules.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,9 @@ export class RulesService {
);

//test first value
const first = firstValApplication.props[parsedRule.firstVal[1]];
const first = firstValApplication.props.find(
(x) => x.id == parsedRule.firstVal[1],
);

result = first.cacheReset ? true : result;

Expand All @@ -1021,7 +1023,9 @@ export class RulesService {
: undefined;

// test second value
const second = secondValApplication?.props[parsedRule.lastVal[1]];
const second = secondValApplication?.props.find(
(x) => x.id == parsedRule.lastVal[1],
);

result = second?.cacheReset ? true : result;
}
Expand Down

0 comments on commit 47ed347

Please sign in to comment.