aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Factories.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-10-02 12:29:31 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-10-02 12:29:31 +0100
commit85293da04381215fbf8384ec2e8d99d9862d6129 (patch)
tree920cdd86390062fa593f16ab12ad62a3d56e2ec6 /perllib/FixMyStreet/DB/Factories.pm
parent0d5cd3beb1aac885614fa3ca19a7e6c054bad65c (diff)
parentfb86b4dd50ad68b8f14351037d077d6cf9bc82b5 (diff)
Merge branch 'issues/commercial/1188-push-state'
Diffstat (limited to 'perllib/FixMyStreet/DB/Factories.pm')
-rw-r--r--perllib/FixMyStreet/DB/Factories.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/Factories.pm b/perllib/FixMyStreet/DB/Factories.pm
index 56cff280b..db80773e7 100644
--- a/perllib/FixMyStreet/DB/Factories.pm
+++ b/perllib/FixMyStreet/DB/Factories.pm
@@ -171,8 +171,8 @@ sub create_problem {
$params->{latitude} += rand(2 * $inaccurate_km) - $inaccurate_km;
$params->{longitude} += rand(3 * $inaccurate_km) - 1.5 * $inaccurate_km,
- $params->{title} = $titles->[$rand];
- $params->{detail} = $descs->[$rand];
+ $params->{title} ||= $titles->[$rand];
+ $params->{detail} ||= $descs->[$rand];
$params->{photo_id} = $photo;
$params->{confirmed} = DateTime::Format::Pg->format_datetime($params->{confirmed});
return $self->create($params);