Commit 550cbc2
fix: approval inbox AJAX 500 on anonymous submissions
The inbox and completed-approvals DataTables endpoints, plus the
inbox Excel export, accessed sub.submitter.get_full_name() directly,
which raised AttributeError: 'NoneType' object has no attribute
'get_full_name' for submissions made through public/anonymous forms.
Introduce a _submitter_label() helper that returns "Anonymous" when
the submission has no submitter and use it in the three unsafe
sites. Other callers across the package already had None guards.
Regression test: TestApprovalInboxView.test_approval_inbox_ajax_handles_anonymous_submitter.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d6414e4 commit 550cbc2
2 files changed
Lines changed: 36 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3679 | 3679 | | |
3680 | 3680 | | |
3681 | 3681 | | |
3682 | | - | |
| 3682 | + | |
3683 | 3683 | | |
3684 | 3684 | | |
3685 | 3685 | | |
| |||
3938 | 3938 | | |
3939 | 3939 | | |
3940 | 3940 | | |
| 3941 | + | |
| 3942 | + | |
| 3943 | + | |
| 3944 | + | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
3941 | 3951 | | |
3942 | 3952 | | |
3943 | 3953 | | |
| |||
4066 | 4076 | | |
4067 | 4077 | | |
4068 | 4078 | | |
4069 | | - | |
4070 | | - | |
4071 | | - | |
| 4079 | + | |
4072 | 4080 | | |
4073 | 4081 | | |
4074 | 4082 | | |
| |||
4212 | 4220 | | |
4213 | 4221 | | |
4214 | 4222 | | |
4215 | | - | |
4216 | | - | |
4217 | | - | |
| 4223 | + | |
4218 | 4224 | | |
4219 | 4225 | | |
4220 | 4226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
144 | 167 | | |
145 | 168 | | |
146 | 169 | | |
| |||
0 commit comments