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

Effective date cannot be optional #109

Open
lucianf opened this issue Jun 8, 2017 · 0 comments
Open

Effective date cannot be optional #109

lucianf opened this issue Jun 8, 2017 · 0 comments

Comments

@lucianf
Copy link

lucianf commented Jun 8, 2017

I'm using a config file that reads effective_date from a CSV field and assigns is to the transaction via a template like this: {date}={effective_date}.

If the effective_date CSV field is empty the program crashes (ValueError: time data '' does not match format '%d/%m/%Y')

Is there any way the template assignment of the effective_date tag to be optional, ie. only take place when effective_date is actually not null?

LE: It turns out the error is only raised when there is a custom ledger_date_format (which would be applied over a null value). I still think it would be best if there was a way to only add the ={effective_date} when the date actually exists; but I don't know how to do this with python format specification (or whether it's even possible in the first place).

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

1 participant