Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect schema if no error #5

Open
alex-eri opened this issue Apr 12, 2014 · 1 comment
Open

Incorrect schema if no error #5

alex-eri opened this issue Apr 12, 2014 · 1 comment

Comments

@alex-eri
Copy link

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'*****'}
                ]
            }
        }
    ]
}
@alex-eri
Copy link
Author

so currently i need do this

  if type(body) == dict and body.get('error'):

and

       for item in body:
            for track, answer in item:

@qnub qnub closed this as completed Apr 12, 2014
@qnub qnub reopened this Apr 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants