Browse Source

change is_active field in UserType

ilya_shyian 1 year ago
parent
commit
2ca4e448df
1 changed files with 2 additions and 3 deletions
  1. 2 3
      store_back/apps/authAPI/schema.py

+ 2 - 3
store_back/apps/authAPI/schema.py

@@ -24,7 +24,7 @@ class UserType(graphene.ObjectType):
     nick = graphene.String()
     username = graphene.String()
     acl = graphene.List(graphene.String)
-    is_active = graphene.Boolean()
+    is_active = graphene.Boolean(name = 'is_active')
     createdAt = graphene.String()
 
 
@@ -47,8 +47,7 @@ class UserType(graphene.ObjectType):
 
 
     def resolve_is_active(self,info):
-        user = User.objects.get(_id = self._id)
-        return user.is_active
+        return self.is_active
 
 
     def resolve_acl(self,info):