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

transaction-date element may not exist #78

Open
hayfield opened this issue Nov 14, 2016 · 1 comment
Open

transaction-date element may not exist #78

hayfield opened this issue Nov 14, 2016 · 1 comment
Assignees

Comments

@hayfield
Copy link
Contributor

This causes problems with

exp_disb_transactions_usd_total = sum([get_USD_value(get_currency(self, transaction), transaction.xpath('value/text()')[0], iso_date(transaction.xpath('transaction-date')[0]).year) for transaction in exp_disb_transactions if iso_date(transaction.xpath('transaction-date')[0]).year <= int(year)])
- direct access is made to a list returned by an xpath query without first ensuring that the element exists.

An example file that causes problems: example.txt

http://iatistandard.org/202/activity-standard/iati-activities/iati-activity/transaction/transaction-date/

@Ocre42 Ocre42 self-assigned this Jan 16, 2019
@Ocre42
Copy link
Contributor

Ocre42 commented Jan 16, 2019

Can be linked to the work to be done on #49

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