Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add dateJoined and lastLogin fields

Marcin Gębalab83e5479b9b9
diff --git a/saleor/graphql/account/types.py b/saleor/graphql/account/types.py
index 70416a1825..c30b4188de 100644
--- a/saleor/graphql/account/types.py
+++ b/saleor/graphql/account/types.py
@@ -42,9 +42,7 @@ class User(CountableDjangoObjectType):
permissions = graphene.List(PermissionDisplay)
class Meta:
- exclude_fields = [
- 'date_joined', 'password', 'is_superuser',
- 'OrderEvent_set', 'last_login']
+ exclude_fields = ['password', 'is_superuser', 'OrderEvent_set']
description = 'Represents user data.'
interfaces = [relay.Node]
model = get_user_model()
diff --git a/tests/api/test_account.py b/tests/api/test_account.py
index 5e1f72fe28..0261db5d0b 100644
--- a/tests/api/test_account.py
+++ b/tests/api/test_account.py
@@ -97,6 +97,8 @@ def test_query_user(staff_api_client, customer_user, permission_manage_users):
orders {
totalCount
}
+ dateJoined
+ lastLogin
defaultShippingAddress {
firstName
lastName