Fix default commits value in diffidtonode

Summary:
The bad type on the default value is causing crashes when there are no "local:commits" fields on a phabricator version.

Created from Diffusion's 'Open in Editor' feature.

Reviewed By: chadaustin, grakkpl

Differential Revision: D22259485

fbshipit-source-id: b11a82b2b099aea373734af96cbd4834f5c5dcbc
This commit is contained in:
Yunus Rahbar 2020-06-26 18:29:40 -07:00 committed by Facebook GitHub Bot
parent c01294e8d6
commit 451d97d6ca

View File

@ -281,7 +281,7 @@ def diffidtonode(repo, diffid):
try:
props = resp["phabricator_version_properties"]["edges"]
commits = []
commits = {}
for prop in props:
if prop["node"]["property_name"] == "local:commits":
commits = json.loads(prop["node"]["property_value"])