From: Tara L Andrews Date: Fri, 16 Aug 2013 07:29:03 +0000 (+0200) Subject: Workaround for bug where tradition gets undef user X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=16a7dd1f7e853704ca345de9e88a880dbb137050;p=scpubgit%2Fstemmaweb.git Workaround for bug where tradition gets undef user --- diff --git a/lib/stemmaweb/Controller/Root.pm b/lib/stemmaweb/Controller/Root.pm index be1ba72..f66dcd5 100644 --- a/lib/stemmaweb/Controller/Root.pm +++ b/lib/stemmaweb/Controller/Root.pm @@ -279,6 +279,9 @@ sub textinfo :Local :Args(1) { if( exists $params->{'owner'} ) { # Only admins can update user / owner my $newownerid = delete $params->{'owner'}; + if( $tradition->has_user && !$tradition->user ) { + $tradition->clear_user; + } unless( !$newownerid || ( $tradition->has_user && $tradition->user->email eq $newownerid ) ) { unless( $c->user->get_object->is_admin ) {