Commit c88f2a1
Dhanush Varma
fix: guard .first() queries against None to prevent AttributeError
Three queries called .first().value or .first().commit without
checking for None. On a fresh install or empty database, these
crash with AttributeError.
Fixed in mod_ci/controllers.py, mod_home/controllers.py, and
mod_sample/controllers.py.1 parent b304ba3 commit c88f2a1
4 files changed
Lines changed: 23 additions & 8 deletions
File tree
- mod_ci
- mod_home
- mod_sample
- templates/sample
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
993 | 993 | | |
994 | 994 | | |
995 | 995 | | |
996 | | - | |
997 | | - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
998 | 1008 | | |
999 | 1009 | | |
1000 | 1010 | | |
| |||
1031 | 1041 | | |
1032 | 1042 | | |
1033 | 1043 | | |
1034 | | - | |
| 1044 | + | |
1035 | 1045 | | |
1036 | 1046 | | |
1037 | 1047 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | | - | |
63 | | - | |
| 64 | + | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
0 commit comments