Skip to content

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

Account enum descriptions

Krzysztof Wolskif665f2c08f48
diff --git a/saleor/graphql/account/enums.py b/saleor/graphql/account/enums.py
index 960187ef27..101a00b859 100644
--- a/saleor/graphql/account/enums.py
+++ b/saleor/graphql/account/enums.py
@@ -18,3 +18,11 @@ CountryCodeEnum = graphene.Enum(
class StaffMemberStatus(graphene.Enum):
ACTIVE = "active"
DEACTIVATED = "deactivated"
+
+ @property
+ def description(self):
+ if self == StaffMemberStatus.ACTIVE:
+ return 'User account has been activated.'
+ elif self == StaffMemberStatus.DEACTIVATED:
+ return 'User account has not been activated yet.'
+ return None