dynatrace-oss / api-client-python

Dynatrace API Python client
Apache License 2.0
60 stars 22 forks source link

Issue 49: Error when getting problem details - handle null grouping entity #50

Closed Dynatrace-James-Kitson closed 3 years ago

Dynatrace-James-Kitson commented 3 years ago

Closes #49

Maybe it changed at some point but the issue is that the groupingEntity can be present but have a null value and this gets passed to create an entity stub which then fails. This just checks for cases when it is null and returns a None value instead of trying to create an entity stub from it.

{ "evidenceType": "AVAILABILITY_EVIDENCE", "displayName": "Availability", "entity": { "entityId": { "id": "HOST-7EC661999923A6B9", "type": "HOST" }, "name": "example_host" }, "groupingEntity": null, "rootCauseRelevant": true, "startTime": 1636719840000, "endTime": 1636721100000 }