aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-01-29 09:09:34 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-01-29 09:09:34 +0000
commit3b301fa326dcfe1c09283ffc4c6ab34a4a4a80b8 (patch)
tree45901723069cf77181a6f336e14be0a28b7923cc
parenta169364fc24fff6db1dd53cc90da8af4f3549250 (diff)
Fix for editing user from having no body to having one.
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 7869b21b7..1d90f50a8 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -937,7 +937,9 @@ sub user_edit : Path('user_edit') : Args(1) {
if ( $user->email ne $c->req->param('email') ||
$user->name ne $c->req->param('name' ) ||
- $user->from_body->id != $c->req->param('body') ) {
+ ($user->from_body && $user->from_body->id != $c->req->param('body')) ||
+ (!$user->from_body && $c->req->param('body'))
+ ) {
$edited = 1;
}