Skip to content

[fix:backport-1.2] Corrected initial field value assignment in AbstractDevice class#1326

Open
nemesifier wants to merge 1 commit into1.2from
1.2-backport-initial-fields-fix
Open

[fix:backport-1.2] Corrected initial field value assignment in AbstractDevice class#1326
nemesifier wants to merge 1 commit into1.2from
1.2-backport-initial-fields-fix

Conversation

@nemesifier
Copy link
Copy Markdown
Member

Backport of #1301 to 1. 2 branch.

Fixed incorrect initialization of `_initial_<field>` values when a
Device instance is loaded with deferred fields, which could break
change detection logic.

[backport 1.2]
@nemesifier nemesifier self-assigned this Mar 28, 2026
@nemesifier nemesifier added the bug label Mar 28, 2026
@nemesifier nemesifier changed the base branch from master to 1.2 March 28, 2026 00:05
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 28, 2026

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

This release PR updates the OpenWISP Controller to version 1.2.2 with bug fixes, documentation improvements, and configuration enhancements. Changes include: updating version metadata and release notes; refining JSONField help text across configuration, template, and device-group models for clarity; fixing ConfigForm to safely handle missing organization data; correcting device field initialization after database refresh; adjusting the Vpn auto-client to use context-derived host values; adding organization filtering to DeviceLocationView; making the update_config Celery task self-aware to prevent self-blocking; converting subnet division post-provision handling to checksum-aware classmethod; fixing the relevant-templates JavaScript selector; and adding comprehensive test coverage for the above changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Bug Fixes ❌ Error Pull request contains multiple critical unfixed issues: checksum cache invalidation bug, missing test cache invalidation, missing setuptools constraint comment, vulnerable hardcoded Selenium IDs, incomplete admin form test payload, and incorrect VPN webhook test mock patching. Reorder checksum cache invalidation before reading value; add cache invalidation in tests; add setuptools comment; refactor Selenium test for dynamic selectors; rebuild admin test with real payload; fix VPN test mock return value.
Description check ⚠️ Warning The PR description is minimal ('Backport of #1301 to 1.2 branch') and lacks most required template sections including checklist, reference to issue, and detailed change description. Expand description to include completed checklist, explicit issue reference (e.g., 'Closes #1301'), and detailed summary of all changes included in this backport.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The PR title includes the required [type] prefix and describes a specific fix related to initial field value assignment in AbstractDevice, which aligns with the primary backported fix.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 1.2-backport-initial-fields-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant