Skip to content
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

Remove information about the email from the basic user information #1627

Merged
merged 2 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Throttling policy for unauthenticated users (<https://github.com/opencv/cvat/pull/1531>)

### Changed
-
- Removed information about e-mail from the basic user information (<https://github.com/opencv/cvat/pull/1627>)

### Deprecated
-
Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/engine/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def validate(self, data):

class Meta:
model = User
fields = ('url', 'id', 'username', 'first_name', 'last_name', 'email')
fields = ('url', 'id', 'username', 'first_name', 'last_name')
ordering = ['-id']

class UserSerializer(serializers.ModelSerializer):
Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/engine/tests/_test_rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,8 @@ def _check_data(self, user, data, is_full):
self.assertEqual(data["username"], user.username)
self.assertEqual(data["first_name"], user.first_name)
self.assertEqual(data["last_name"], user.last_name)
self.assertEqual(data["email"], user.email)
extra_check = self.assertIn if is_full else self.assertNotIn
extra_check("email", data)
extra_check("groups", data)
extra_check("is_staff", data)
extra_check("is_superuser", data)
Expand Down