diff --git a/.gitignore b/.gitignore
index 444c29d..d826ffe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
!.gitkeep
-
+imprint.html
data/
# Byte-compiled / optimized / DLL files
diff --git a/web/finances.py b/web/finances.py
index 3078e36..a0d5958 100755
--- a/web/finances.py
+++ b/web/finances.py
@@ -22,7 +22,11 @@ def get_finances():
def register(app):
@app.route('/finances')
def finances_view():
- data = get_finances()
+ try:
+ data = get_finances()
+ except Exception:
+ return flask.Response('Error fetching finances from database. This might be cause the data is still being processed. Sorry.', status=500)
+
finances = {
'donations_total': round(sum([i['amount_usd'] for i in data['donations']])),
'donations_num': len(data['donations']),
diff --git a/web/templates/account.html b/web/templates/account.html
index 7d688a7..d7f4dee 100644
--- a/web/templates/account.html
+++ b/web/templates/account.html
@@ -13,7 +13,8 @@
API credits: {{ user.credits or 0 }}
Secret API key (click to reveal):
- {{ user.api_key or '-' }}
+
+ {{ "API key not shown for security reasons" or '-' }}
(Click again to copy)