Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@petrblaho
Created December 5, 2017 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petrblaho/c1ace6d881b96f880679341cdbfff995 to your computer and use it in GitHub Desktop.
Save petrblaho/c1ace6d881b96f880679341cdbfff995 to your computer and use it in GitHub Desktop.
In [1]: from zonkylla.core.utils import iso2datetime
In [2]: from zonkylla.core.reports import upcoming_transactions
In [3]: trans = upcoming_transactions()
In [4]: filtered = [t for t in trans]
In [5]: filtered = [t for t in trans if t['payment_date'] == '2018-01-01']
In [6]: filtered
Out[6]: []
In [7]: filtered = [t for t in trans if t['payment_date'] == iso2datetime('2018-01-01')]
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
~/workspace/zonkylla/.tox/py36/lib/python3.6/site-packages/zonkylla/__main__.py in <module>()
----> 1 filtered = [t for t in trans if t['payment_date'] == iso2datetime('2018-01-01')]
~/workspace/zonkylla/.tox/py36/lib/python3.6/site-packages/zonkylla/__main__.py in <listcomp>(.0)
----> 1 filtered = [t for t in trans if t['payment_date'] == iso2datetime('2018-01-01')]
NameError: name 'iso2datetime' is not defined
In [8]:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment