✨(backend) add API access for 'language' attribute on User model
- allow the language attribute on the user to be updated via API - add frontend function to update the user language via API - extend defaults on the test users, to have fixed language in E2E tests - extend types and variables using the types with the new field
This commit is contained in:
@@ -23,7 +23,7 @@ class UserSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = models.User
|
||||
fields = ["id", "email", "full_name", "short_name"]
|
||||
fields = ["id", "email", "full_name", "short_name", "language"]
|
||||
read_only_fields = ["id", "email", "full_name", "short_name"]
|
||||
|
||||
|
||||
|
||||
@@ -158,6 +158,7 @@ def test_api_users_retrieve_me_authenticated():
|
||||
"id": str(user.id),
|
||||
"email": user.email,
|
||||
"full_name": user.full_name,
|
||||
"language": user.language,
|
||||
"short_name": user.short_name,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user