Skip to content

Commit

Permalink
Remove information about the email from the basic user information (c…
Browse files Browse the repository at this point in the history
…vat-ai#1627)

* Remove information about the email from the basic user information.
  • Loading branch information
nmanovic authored and Fernando Martínez González committed Aug 3, 2020
1 parent 798234a commit f473e5d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit f473e5d

Please sign in to comment.