diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-24 10:33:05 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-05-24 10:33:05 +0100 |
commit | 72ab2740e2c8c24e62b6e9d98f686498b1225b09 (patch) | |
tree | 4e0260c14afbbdcd79ebe66f09aa37d9af509157 /perllib/Open311.pm | |
parent | da305260b4db386af9fb2c48d9055a2934069c84 (diff) | |
parent | ec4fb8fe445efd5cb584ac7021707c41a0188cdb (diff) |
Merge branch 'user-inactivity'
Diffstat (limited to 'perllib/Open311.pm')
-rw-r--r-- | perllib/Open311.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/perllib/Open311.pm b/perllib/Open311.pm index dc40076db..a91de0a7c 100644 --- a/perllib/Open311.pm +++ b/perllib/Open311.pm @@ -132,7 +132,7 @@ sub _populate_service_request_params { description => $description, service_code => $service_code, first_name => $firstname, - last_name => $lastname || '', + last_name => $lastname, }; $params->{phone} = $problem->user->phone if $problem->user->phone; @@ -413,9 +413,11 @@ sub _populate_service_request_update_params { sub split_name { my ( $self, $name ) = @_; + return ('', '') unless $name; + my ( $first, $last ) = ( $name =~ /(\w+)(?:\.?\s+(.+))?/ ); - return ( $first, $last ); + return ( $first || '', $last || ''); } sub _params_to_string { |