diff options
Diffstat (limited to 'wqflask/wqflask/collect.py')
-rw-r--r-- | wqflask/wqflask/collect.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/wqflask/wqflask/collect.py b/wqflask/wqflask/collect.py index 29b73130..b1ea46d8 100644 --- a/wqflask/wqflask/collect.py +++ b/wqflask/wqflask/collect.py @@ -48,12 +48,19 @@ from base import trait @app.route("/collections/add") def collections_add(): - user_collections = g.user_session.user_ob.user_collections - print("user_collections are:", user_collections) - return render_template("collections/add.html", - traits=request.args['traits'], - user_collections = user_collections, - ) + traits=request.args['traits'], + + if g.user_session.logged_in: + user_collections = g.user_session.user_ob.user_collections + print("user_collections are:", user_collections) + return render_template("collections/add.html", + traits=traits, + user_collections = user_collections, + ) + else: + return render_template("collections/add_anonymous.html", + traits=traits + ) @app.route("/collections/new") |