-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated settings to avoid concurrency updates #165
Updated settings to avoid concurrency updates #165
Conversation
…tability) Updated - test to set language.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looking good. one single comment for you to look at
zeeguu/api/endpoints/user.py
Outdated
@@ -131,23 +131,20 @@ def user_settings(): | |||
user.set_native_language(submitted_native_language_code) | |||
|
|||
# deprecating the larned_language_code |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why this message is here.
Could it be that it refers to the choosing learned_langauge_code
or learned_language
? We should look in the web, see which is the one used, and only keep that. The same above with native_language_code
and native_language
.
@tfnribeiro - is this ready to merge Tiago? I forgot. |
@mircealungu should be ready to merge! I removed the
|
Changes to avoid conflicts when a user changes to a new language in the front-end settings.
The issue involves changing to a language that the user has not studied and it can reliably cause a concurrency issue in the backend which also causes a failure at the front end.
To solve this, I made that whenever the endpoint is called from the frontend - all the updates are made in the same session and then committed, avoiding the concurrency.
Implementation:
Depends on:
zeeguu/web#406