Skip to content

Commit

Permalink
#334 make g.user.is_authenticated() an attribute (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Oct 28, 2020
1 parent e718766 commit ebb0938
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions GeoHealthCheck/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def before_request():
# We need to pass-through static resources like CSS.
if any(['/static/' in request.path,
request.path.endswith('.ico'),
g.user.is_authenticated(), # This is from Flask-Login
g.user.is_authenticated, # This is from Flask-Login
(request.endpoint is not None
and getattr(APP.view_functions[request.endpoint],
'is_public', False))]):
Expand Down Expand Up @@ -522,8 +522,6 @@ def register():
@login_required
def add():
"""add resource"""
if not g.user.is_authenticated():
return render_template('add.html')
if request.method == 'GET':
return render_template('add.html')
resource_type = request.form['resource_type']
Expand Down

0 comments on commit ebb0938

Please sign in to comment.