mirror of
https://github.com/amidaware/tacticalrmm.git
synced 2026-04-26 23:15:57 +03:00
[PR #1301] [MERGED] break from loop once a valid policy is found. remove old unused list #1847
Labels
No labels
In Process
bug
bug
dev-triage
documentation
duplicate
enhancement
fixed
good first issue
help wanted
integration
invalid
pull-request
question
requires agent update
security
ui tweak
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tacticalrmm#1847
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amidaware/tacticalrmm/pull/1301
Author: @af7567
Created: 10/3/2022
Status: ✅ Merged
Merged: 10/6/2022
Merged by: @wh1te909
Base:
develop← Head:policyselect2📝 Commits (2)
24c899cbreak from loop once a valid policy is found. remove old unused listdb45400remove parentheses from if statement to fix codestyle test📊 Changes
1 file changed (+4 additions, -7 deletions)
View changed files
📝
api/tacticalrmm/agents/models.py(+4 -7)📄 Description
get_patch_policy()was always going through to the end of the agent policies list instead of breaking from the loop once a valid policy is found. Sinceget_agent_policies()returns the list in order of preference, the least preferred policy was always getting selected.Also removed the
processed_policieslist which is not used, seems to be left over from when the policy was selected a different way.Fixes #1293
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.