aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/decorators.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r/decorators.py')
-rw-r--r--pyaggr3g470r/decorators.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyaggr3g470r/decorators.py b/pyaggr3g470r/decorators.py
index a32e9709..0052dc80 100644
--- a/pyaggr3g470r/decorators.py
+++ b/pyaggr3g470r/decorators.py
@@ -24,9 +24,9 @@ def feed_access_required(func):
"""
@wraps(func)
def decorated(*args, **kwargs):
- if kwargs.get('feed_id', None) != None:
+ if kwargs.get('feed_id', None) is not None:
feed = Feed.query.filter(Feed.id == kwargs.get('feed_id', None)).first()
- if feed != None and (feed.subscriber.id == g.user.id or g.user.is_admin()):
+ if feed is not None and (feed.subscriber.id == g.user.id or g.user.is_admin()):
return func(*args, **kwargs)
flash("This feed do not exist.", "danger")
return redirect(url_for('home'))
bgstack15