]> git.rmz.io Git - dotfiles.git/blobdiff - bin/starling.py
nvim: add FPP copyright snippet
[dotfiles.git] / bin / starling.py
index 0941cbb2f69b163fcfbd7fe8d2a52ca7ac3dda9d..471cd1438310ff95f18affb11c8a6083feafbf8b 100755 (executable)
@@ -12,6 +12,8 @@ class FeedError(Exception):
 
 def read_feed_item(i):
     try:
+        if i.get("status", "") == "DECLINED":
+            return
         date = datetime.strptime(i["transactionTime"], "%Y-%m-%dT%H:%M:%S.%fZ")
         amount = i["amount"]["minorUnits"] / 100
         if i["direction"] == "OUT":