• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openwisp / openwisp-controller / 16627053900
99%

Build:
DEFAULT BRANCH: master
Ran 30 Jul 2025 03:46PM UTC
Jobs 1
Files 120
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jul 2025 03:35PM UTC coverage: 98.759% (+0.001%) from 98.758%
16627053900

push

github

web-flow
[fix] Don't delete VpnClients when enforcing required templates

Bug:
The SortedManyToManyField clears all templates before adding new ones.
This operation emits an `m2m_changed` signal with the `post_clear` action,
which triggers the `Config.enforce_required_templates` receiver to add
required templates back.

Adding required templates emits another `m2m_changed` signal with the
`post_add` action, which executes `Config.manage_vpn_clients` receiver.
At this point, only required templates exist in the DB, hence we cannot
decide which VpnClient objects to delete.

Fix:
We don't delete any VpnClient objects when the `m2m_changed` signal
is sent for the `post_add` action for adding required templates.
The receiver will be called again with the `post_add` action when
all the templates are added back, including the required ones.
And then, it will delete any VpnClient objects that are not
associated with the current templates.

---------

Co-authored-by: Federico Capoano <f.capoano@openwisp.io>

6444 of 6525 relevant lines covered (98.76%)

11.85 hits per line

Jobs
ID Job ID Ran Files Coverage
1 python- - 16627053900.1 30 Jul 2025 03:46PM UTC 120
98.76
GitHub Action Run
Source Files on build 16627053900
  • Tree
  • List 120
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #16627053900
  • 6d997e10 on github
  • Prev Build on master (#16625276061)
  • Next Build on master (#16687379333)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc