Fix subattachment target
parsing, fixes #412
This commit is contained in:
@@ -268,8 +268,10 @@ def graphql_to_attachment(data):
|
|||||||
|
|
||||||
|
|
||||||
def graphql_to_subattachment(data):
|
def graphql_to_subattachment(data):
|
||||||
_type = data["target"]["__typename"]
|
target = data.get("target")
|
||||||
if _type == "Video":
|
type_ = target.get("__typename") if target else None
|
||||||
|
|
||||||
|
if type_ == "Video":
|
||||||
return VideoAttachment._from_subattachment(data)
|
return VideoAttachment._from_subattachment(data)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
Reference in New Issue
Block a user