Skip to content
Snippets Groups Projects
Commit 932fa650 authored by jan.bednarik's avatar jan.bednarik
Browse files

Resolve total reports on Author type.

parent a87b06f7
No related branches found
No related tags found
No related merge requests found
...@@ -169,6 +169,9 @@ class Author(graphene.ObjectType): ...@@ -169,6 +169,9 @@ class Author(graphene.ObjectType):
return ReportConnection(page_info=page_info, edges=edges, total_count=total) return ReportConnection(page_info=page_info, edges=edges, total_count=total)
def resolve_total_reports(self, info, **kwargs):
return models.Report.objects.filter(author_id=self.id, is_draft=False).count()
class LoginShortcut(graphene.ObjectType): class LoginShortcut(graphene.ObjectType):
name = graphene.String() name = graphene.String()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment