diff options
author | Matthew Somerville <matthew@mysociety.org> | 2014-01-14 16:28:13 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2014-01-14 16:28:13 +0000 |
commit | 1222e5f35a8556705f75014a3de8a4e4c54a5cba (patch) | |
tree | 3973ae0a99b77f69d21fec7c5d7ed37c0b76fe44 /perllib/Open311.pm | |
parent | f117167ce79aefdda63b0cb66c446e941fc28da0 (diff) |
Default lastname of '-' if none found.
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r-- | perllib/Open311.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm index 94d81e479..25119b867 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -291,6 +291,7 @@ sub _populate_service_request_update_params { my $name = $comment->name || $comment->user->name; my ( $firstname, $lastname ) = ( $name =~ /(\w+)\.?\s+(.+)/ ); + $lastname ||= '-'; # fall back to problem state as it's probably correct my $state = $comment->problem_state || $comment->problem->state; |