ru-post-soap-client
ru-post-soap-client copied to clipboard
Incorrect schema if no error
Schema differs from README
{u'*****':
[
{u'****': {
'data': [
{'oper_ctg': 1,
'oper_type': 1,
'date': datetime.datetime(2014, 3, 17, 0, 0),
'attribute': u'Вручение адресату',
'operation': u'Приём', 'zipcode': u'******'},
{'oper_ctg': 4,
'oper_type': 8,
'date': datetime.datetime(2014, 3, 18, 4, 4),
'attribute': u'Покинуло сортировочный центр',
'operation': u'Обработка',
'zipcode': u'******'},
{'oper_ctg': 4,
'oper_type': 8,
'date': datetime.datetime(2014, 3, 21, 9, 11),
'attribute': u'Покинуло сортировочный центр',
'operation': u'Обработка',
'zipcode': u'*****'},
{'oper_ctg': 4,
'oper_type': 8,
'date': datetime.datetime(2014, 4, 6, 0, 0),
'attribute': u'Покинуло сортировочный центр',
'operation': u'Обработка',
'zipcode': u'*****'}
]
}
}
]
}
so currently i need do this
if type(body) == dict and body.get('error'):
and
for item in body:
for track, answer in item: