openwisp-radius
openwisp-radius copied to clipboard
[change:radius] Replace third-party JSONField with Django built-in JSONField
Checklist
- [x] I have read the OpenWISP Contributing Guidelines.
- [x] I have manually tested the changes proposed in this pull request.
- [x] I have written new test cases for new code and/or updated existing tests for changes to existing code.
- [ ] I have updated the documentation.
Reference to Existing Issue
Closes #600.
Description of Changes
This PR replaces the third-party jsonfield library with Django's built-in JSONField. The third-party JSONField library hasn't received updates in 5 years, while Django's built-in JSONField is now mature and actively maintained.
Changes Made:
- Replaced
from jsonfield import JSONFieldwithfrom django.db.models import JSONFieldin models - Updated
RadiusBatch.user_credentialsandOrganizationRadiusSettings.sms_meta_datafields - Removed
"jsonfield~=3.1.0"dependency from setup.py - Added migration
0041_replace_jsonfield_with_django_builtin.pyto handle field type transition - Updated test migrations to use Django's JSONField
Testing:
- All existing tests pass with the new implementation
- Verified RadiusBatch and SMS metadata functionality
- Migration tested without data loss
@nemesifier kindly review
coverage: 97.268% (-0.001%) from 97.269% when pulling ba82cd9b82d5320229abc568322f3a33963efbb1 on Eeshu-Yadav:issues/600-replace-jsonfield-clean into 38ee4426cee3a23a15c226c72c29bebce032fe9d on openwisp:master.
@nemesifier kindly review