openwisp-radius
openwisp-radius copied to clipboard
[change] Making batch imports atomic #551
Used transaction.atomic() to ensure all operations inside succeed together. Incase of failure rollback will occure.
Fixes #551
Checklist
- [x] I have read the OpenWISP Contributing Guidelines.
- [x] I have manually tested the changes proposed in this pull request.
- [ ] 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 #551.
Description of Changes
Added usage of transaction.atomic() functions to introduce atomicity and rollback in case of transaction operation failure.