Fix: avoid mutating device.name in _get_common_name#1300
Fix: avoid mutating device.name in _get_common_name#1300k-sumayya wants to merge 1 commit intoopenwisp:masterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
🧰 Additional context used📓 Path-based instructions (4)**/*.{js,ts,tsx,jsx,py,java,go,cs,rb,php,c,cpp,h,hpp}📄 CodeRabbit inference engine (Custom checks)
Files:
**/*.{js,ts,tsx,jsx,py,java,go,cs,rb,php,c,cpp,h,hpp,sql}📄 CodeRabbit inference engine (Custom checks)
Files:
**/*.{js,ts,tsx,jsx,py,java,go,cs,rb,php,c,cpp,h,hpp,sh,bash,sql}📄 CodeRabbit inference engine (Custom checks)
Files:
**/*.{py,html}📄 CodeRabbit inference engine (Custom checks)
Files:
🧠 Learnings (3)📚 Learning: 2026-01-15T15:05:49.557ZApplied to files:
📚 Learning: 2026-02-17T19:13:10.088ZApplied to files:
📚 Learning: 2026-01-15T15:07:17.354ZApplied to files:
🔇 Additional comments (2)
📝 WalkthroughWalkthroughThis change modifies Sequence Diagram(s)Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
Commit Message Format FailureHello @k-sumayya, The CI failed because the commit message does not follow the required format. Please ensure your commit messages adhere to the following structure:
Here is an example of a correctly formatted commit message: |
This fixes an issue where device.name was modified in-place, which could cause unexpected behavior due to Django ORM caching. Fixes openwisp#1300
c392985 to
4510266
Compare
This fixes an issue where device.name was modified in-place, which could cause unexpected behavior due to Django ORM caching. Fixes openwisp#1300
4510266 to
46acb5f
Compare
|
Thank you for the review! Please let me know if anything else is needed from my side. |
Fix: Avoid in-place mutation of device.name in _get_common_name
This PR fixes an issue where
_get_common_namewas mutatingdevice.namedirectly, causing unintended side effects due to Django ORM caching.Changes:
device.namenameto safely handle truncationResult:
device.nameunchangedCloses #1296