Move graphql_to_poll -> Poll._from_graphql

This commit is contained in:
Mads Marquart
2019-03-07 19:52:29 +01:00
parent e51ce99c1a
commit 0578ea2c3c
4 changed files with 10 additions and 12 deletions

View File

@@ -217,16 +217,6 @@ def graphql_to_live_location(a):
)
def graphql_to_poll(a):
rtn = Poll(
title=a.get("title") if a.get("title") else a.get("text"),
options=[PollOption._from_graphql(m) for m in a.get("options")],
)
rtn.uid = int(a["id"])
rtn.options_count = a.get("total_count")
return rtn
def graphql_to_plan(a):
if a.get("event_members"):
rtn = Plan(