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

fix: add id in pending_enterprise_customer_admin_user serializer #2239

Merged
merged 2 commits into from
Sep 13, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Unreleased
----------
* nothing unreleased

[4.25.12]
----------
* feat: add username query to enterprise customer user query

[4.25.11]
----------
* feat: add username query to enterprise customer user query
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Your project description goes here.
"""

__version__ = "4.25.11"
__version__ = "4.25.12"
2 changes: 1 addition & 1 deletion enterprise/api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ class PendingEnterpriseCustomerAdminUserSerializer(serializers.ModelSerializer):
class Meta:
model = PendingEnterpriseCustomerAdminUser
fields = (
'enterprise_customer', 'user_email'
'id', 'enterprise_customer', 'user_email'
)

def validate(self, attrs):
Expand Down
9 changes: 4 additions & 5 deletions tests/test_enterprise/api/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ def test_post_pending_enterprise_customer_admin_user_creation(self):
data = {
'enterprise_customer': self.enterprise_customer.uuid,
'user_email': self.user.email,
'id': 2
}

response = self.client.post(settings.TEST_SERVER + PENDING_ENTERPRISE_CUSTOMER_ADMIN_LIST_ENDPOINT, data=data)
Expand Down Expand Up @@ -949,11 +950,9 @@ def test_get_pending_enterprise_customer_admin_user(self):

self.assertEqual(response.status_code, status.HTTP_200_OK)

expected_data = {
'enterprise_customer': self.enterprise_customer.uuid,
'user_email': '[email protected]'
}
self.assertEqual(response.data, expected_data)
expected_keys = ['enterprise_customer', 'user_email', 'id']
for key in expected_keys:
self.assertIn(key, response.data)

def test_patch_pending_enterprise_customer_admin_user(self):
"""
Expand Down
Loading