[Fix for issue #396] Ignoring devices from device list response with missing keys #398
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The /device/list endpoint did return my Delta 3 Plus with a missing puductName field.
This change ignores all devices that don't include a "sn", "online"-status and a "productName".
{ 'code': '0', 'message': 'Success', 'data': [{ 'sn': 'XXXXXXXX, 'online': 0, 'productName': 'PowerStream' }, { 'sn': 'XXXXXXXX', 'deviceName': 'PowerStream Delta Pro 3', 'online': 0, 'productName': 'PowerStream' }, { 'sn': 'XXXXXXXX', 'deviceName': 'WAVE 2', 'online': 0, 'productName': 'WAVE 2' }, { 'sn': 'XXXXXXXX', 'deviceName': 'DELTA Pro 3', 'online': 1, 'productName': 'DELTA Pro 3' }, { 'sn': 'XXXXXXXX', 'deviceName': 'Delta 3 Plus', 'online': 1 }], 'eagleEyeTraceId': 'ea1a2a582917358540634803952d0007', 'tid': '' }