Skip to content

Commit

Permalink
fix: add id in pending_enterprise_customer_admin_user serializer (#2239)
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzawaleed01 committed Sep 13, 2024
1 parent 81dfa71 commit 1745b40
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
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

0 comments on commit 1745b40

Please sign in to comment.