Skip to content

Commit

Permalink
[frontend][migration] do not print traceback when no logged user
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyX committed Feb 26, 2016
1 parent 68cc0d3 commit 0a98761
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/coprs_frontend/coprs/views/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ def wrapper(**kwargs):
@misc.route("/migration-report/")
@misc.route("/migration-report/<username>")
def coprs_migration_report(username=None):
if not username:
if not username and not flask.g.user:
return generic_error("You are not logged in")
elif not username:
username = flask.g.user.name
user = UsersLogic.get(username).first()

Expand Down

0 comments on commit 0a98761

Please sign in to comment.