Commit 3a3cda5
committed
Fix erroneous use of "is"
The `is` operator checks for identity, not equality. To check for an empty
list, one should use either:
if roles == []:
Or just take advantage of the fact that an empty list is `False` when used
in a boolean expression, and write:
if not roles:
This commit takes the second option.1 parent 3423f2c commit 3a3cda5
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
0 commit comments