aboutsummaryrefslogtreecommitdiff
path: root/wqflask/wqflask/collect.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/wqflask/collect.py')
-rwxr-xr-xwqflask/wqflask/collect.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py
index 28d774c0..99dabf50 100755
--- a/wqflask/wqflask/collect.py
+++ b/wqflask/wqflask/collect.py
@@ -232,12 +232,16 @@ def create_new(collection_name):
@app.route("/collections/list")
def list_collections():
params = request.args
- user_collections = list(g.user_session.user_ob.user_collections)
- print("user_collections are:", user_collections)
- return render_template("collections/list.html",
- params = params,
- user_collections = user_collections,
- )
+ try:
+ user_collections = list(g.user_session.user_ob.user_collections)
+ print("user_collections are:", user_collections)
+ return render_template("collections/list.html",
+ params = params,
+ user_collections = user_collections,
+ )
+ except:
+ return render_template("collections/not_logged_in.html",
+ params = params)
@app.route("/collections/remove", methods=('POST',))