Skip to content

Commit

Permalink
Fix admin editing of anonymous reports
Browse files Browse the repository at this point in the history
Not submitting the name field would cause a DB
error becuase it would try to set `name` to NULL.
And including the other two seemed like a good
idea too.
  • Loading branch information
davea committed Sep 18, 2024
1 parent 91bc758 commit ea6b45f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/web/base/admin/reports/_edit_main.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@
<div class="clearfix full-width" style="background-color: #eee; padding: 1em 1em 0;">
[% IF problem.user.email == cobrand.anonymous_account.email %]
<p>[% loc('User:') %] [% loc('Anonymous user') %]</p>
<input type='hidden' name='name' value='[% problem.name | html %]'></li>
<input type='hidden' name='username' value='[% problem.user.username | html %]'>
<input type='hidden' name='anonymous' value='[% IF problem.anonymous %]1[% ELSE %]0[% END %]'>
[% ELSE %]

[% IF allowed_pages.user_edit %]
Expand Down

0 comments on commit ea6b45f

Please sign in to comment.