aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2014-01-14 16:28:13 +0000
committerMatthew Somerville <matthew@mysociety.org>2014-01-14 16:28:13 +0000
commit1222e5f35a8556705f75014a3de8a4e4c54a5cba (patch)
tree3973ae0a99b77f69d21fec7c5d7ed37c0b76fe44
parentf117167ce79aefdda63b0cb66c446e941fc28da0 (diff)
Default lastname of '-' if none found.
-rw-r--r--perllib/Open311.pm1
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;