django-allauth
django-allauth copied to clipboard
[WIP]save only updated fields
Submitting Pull Requests
General
- [ ] Make sure you use semantic commit messages.
Examples:
"fix(google): Fixed foobar bug"
,"feat(accounts): Added foobar feature"
. - [ ] All Python code must formatted using Black, and clean from pep8 and isort issues.
- [ ] JavaScript code should adhere to StandardJS.
- [ ] If your changes are significant, please update
ChangeLog.rst
. - [ ] If your change is substantial, feel free to add yourself to
AUTHORS
.
Provider Specifics
There is possible to get raise conditions. I.e.
- allauth update email field of the user in the memory
- another process update some other user fields
- allauth save user into DB and this will override all changes on step 2
My point that is better to specify fields to update, in order to keep changes(https://docs.djangoproject.com/en/4.0/ref/models/instances/#specifying-which-fields-to-save).
But cons of that solution that could be some fields that should be updated on the user save, ie updated_at
and because it's not specified they wont updated during save.
@pennersr please let me know if those changes could be useful for the project. I'm also not sure that is raise condition test could be implemented in the unittest. Maybe you have any suggestions about that.
In case you add a new provider:
- [ ] Make sure unit tests are available.
- [ ] Add an entry of your provider in
test_settings.py::INSTALLED_APPS
anddocs/installation.rst::INSTALLED_APPS
. - [ ] Add documentation to
docs/providers.rst
. - [ ] Add an entry to the list of supported providers over at
docs/overview.rst
.