Skip to content

Commit

Permalink
Fix issue #574
Browse files Browse the repository at this point in the history
  • Loading branch information
ehooo committed Apr 13, 2020
1 parent 8127716 commit 47daa15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bandit/plugins/django_xss.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def is_assigned(self, node):
assigned = self.is_assigned_in(node.body)
else:
for withitem in node.items:
if withitem.optional_vars.id == self.var_name.id:
if getattr(withitem.optional_vars, 'id', None) == self.var_name.id:
assigned = node
else:
assigned = self.is_assigned_in(node.body)
Expand Down

0 comments on commit 47daa15

Please sign in to comment.