Skip to content

Commit

Permalink
Make sure perms list isn't None before looking within list (apache#12915
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jhtimmins authored Dec 8, 2020
1 parent f9e9ad2 commit 85dd092
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/www/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def _has_role(self, role_name_or_list):

def _has_perm(self, permission_name, view_menu_name):
"""Whether the user has this perm"""
if hasattr(self, 'perms'):
if hasattr(self, 'perms') and self.perms is not None:
if (permission_name, view_menu_name) in self.perms:
return True
# rebuild the permissions set
Expand Down

0 comments on commit 85dd092

Please sign in to comment.