Skip to content

Commit

Permalink
prevent error in case of missing json attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouni committed Sep 8, 2021
1 parent 6fffd3f commit 5690b32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def get_part_data(self):
data = r.json()
for k, v in parameters.items():
self.data_list.AppendItem([v, str(data[k])])
for item in data["paramVOList"]:
for item in data.get("paramVOList"):
self.data_list.AppendItem([item["paramNameEn"], str(item["paramValueEn"])])

self.picture = data["productImages"][0]

0 comments on commit 5690b32

Please sign in to comment.