diff --git a/files/helpers/lottery.py b/files/helpers/lottery.py
index af24a51e08..619ee6e59e 100644
--- a/files/helpers/lottery.py
+++ b/files/helpers/lottery.py
@@ -49,7 +49,9 @@ def end_lottery_session():
active_lottery.is_active = False
manager = g.db.query(User).get(LOTTERY_MANAGER_ACCOUNT_ID)
- manager.coins -= active_lottery.prize
+
+ if manager:
+ manager.coins -= active_lottery.prize
g.db.commit()
@@ -88,7 +90,9 @@ def purchase_lottery_ticket(v):
grant_lottery_proceeds_to_manager(net_ticket_value)
beneficiary = g.db.query(User).get(LOTTERY_ROYALTY_ACCOUNT_ID)
- beneficiary.coins += LOTTERY_ROYALTY_RATE
+
+ if beneficiary:
+ beneficiary.coins += LOTTERY_ROYALTY_RATE
g.db.commit()
@@ -96,7 +100,9 @@ def purchase_lottery_ticket(v):
def grant_lottery_proceeds_to_manager(amount):
manager = g.db.query(User).get(LOTTERY_MANAGER_ACCOUNT_ID)
- manager.coins += amount
+
+ if manager:
+ manager.coins += amount
def grant_lottery_tickets_to_user(v, amount):
active_lottery = get_active_lottery()
diff --git a/files/templates/authforms.html b/files/templates/authforms.html
index 052fc4563a..dc31e87455 100644
--- a/files/templates/authforms.html
+++ b/files/templates/authforms.html
@@ -19,7 +19,7 @@
{% if v %}
-
+
{% if v.agendaposter %}
-
+
{% if v.css %}
{% endif %}
diff --git a/files/templates/default.html b/files/templates/default.html
index 78d6bd52de..6b2da98588 100644
--- a/files/templates/default.html
+++ b/files/templates/default.html
@@ -14,7 +14,7 @@
{% if v %}
-
+
{% if v.agendaposter %}
-
+
{% if v.agendaposter %}
-
+
{% if v.agendaposter %}
-
+
{% else %}
diff --git a/files/templates/submit.html b/files/templates/submit.html
index f5a6aa6883..f3d80cdec4 100644
--- a/files/templates/submit.html
+++ b/files/templates/submit.html
@@ -28,7 +28,7 @@
{% if v %}
-
+
{% if v.agendaposter %}