Fix issue 8: Aspect set matroos is nu een lege dict

This commit is contained in:
Marcel Nijenhof
2020-03-16 12:40:58 +01:00
parent 9d267a4afe
commit 648675425e

View File

@@ -233,9 +233,14 @@ Returns the results part of the response.
def aspectSet(self): def aspectSet(self):
"""aspectSet() """aspectSet()
Returns the metadata of the aspectSet Returns the metadata of the aspectSet.
Note: Return a empty dict if there is no aspectset (matroos)
""" """
return(self.result()["observationType"]["aspectSet"]["aspects"]) observationType = self.result().get("observationType", {})
aspectSet = observationType.get("aspectSet", {})
aspects = aspectSet.get("aspects", {})
return(aspects)
def location(self): def location(self):
"""location() """location()