File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -74,9 +74,10 @@ def has_all_permissions(request, check_list=[]):
7474 qry ['content_type__app_label' ] = app_label
7575 if codename :
7676 qry ['codename' ] = codename
77- perms = user_permissions .filter (** qry )
78- has_permission = True
79- if not perms :
77+
78+ if user_permissions .filter (** qry ):
79+ has_permission = True
80+ else :
8081 return False
8182
8283 return has_permission
Original file line number Diff line number Diff line change @@ -328,13 +328,14 @@ def test_manage_permafrost_roles_returns_correct_template(self):
328328
329329 def test_permafrostrole_manage_template_displays_list_of_roles_on_site (self ):
330330 uri = reverse ('permafrost:roles-manage' )
331+ import html
331332 response = self .client .get (uri )
332333 objects = PermafrostRole .on_site .all ()
333334
334335 self .assertTrue (len (objects ))
335336
336337 for object in objects :
337- self .assertContains (response , f'{ object } ' )
338+ self .assertContains (response , html . escape ( f'{ object } ' ) )
338339
339340 def test_permafrostrole_manage_template_displays_selected_role_details (self ):
340341 uri = reverse ('permafrost:roles-manage' )
You can’t perform that action at this time.
0 commit comments