diff --git a/perllib/Open311/Endpoint/Integration/Whitespace.pm b/perllib/Open311/Endpoint/Integration/Whitespace.pm index 13b77ac2..54db69ac 100644 --- a/perllib/Open311/Endpoint/Integration/Whitespace.pm +++ b/perllib/Open311/Endpoint/Integration/Whitespace.pm @@ -79,7 +79,7 @@ sub post_service_request { my $integration = $self->get_integration; $args->{attributes}{location_of_containers} //= ''; - $args->{attributes}{quantity} //= 1; + $args->{attributes}{quantity} ||= 1; my $worksheet_id = $integration->CreateWorksheet({ service_code => $args->{service_code}, diff --git a/t/open311/endpoint/whitespace.t b/t/open311/endpoint/whitespace.t index e9d5a6eb..4ddb2937 100644 --- a/t/open311/endpoint/whitespace.t +++ b/t/open311/endpoint/whitespace.t @@ -109,7 +109,7 @@ subtest "GET service" => sub { { code => 'fixmystreet_id', order => 3, required => 'true', variable => 'false', datatype => 'string', datatype_description => '', automated => 'server_set', description => 'external system ID' }, { code => 'assisted_yn', order => 4, required => 'false', variable => 'true', datatype => 'string', datatype_description => '', automated => 'hidden_field', description => 'Assisted collection (Yes/No)' }, { code => 'location_of_containers', order => 5, required => 'false', variable => 'true', datatype => 'string', datatype_description => '', automated => 'hidden_field', description => 'Location of containers' }, - { code => 'quantity', order => 6, required => 'false', variable => 'true', datatype => 'number', datatype_description => '', automated => 'hidden_field', description => 'Number of containers' }, + { code => 'quantity', order => 6, required => 'false', variable => 'true', datatype => 'string', datatype_description => '', automated => 'hidden_field', description => 'Number of containers' }, ], }, 'correct json returned'; };