diff options
-rw-r--r-- | conf/systemd.example | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Contact.pm | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/conf/systemd.example b/conf/systemd.example index 1f8edf13c..7f22b091a 100644 --- a/conf/systemd.example +++ b/conf/systemd.example @@ -7,7 +7,7 @@ After=network.target Type=forking User=fms PIDFile=/var/www/fixmystreet/fixmystreet.pid -ExecStartPre=mkdir /var/www/fixmystreet/logs +ExecStartPre=/bin/mkdir -p /var/www/fixmystreet/logs ExecStart=/var/www/fixmystreet/fixmystreet/script/server \ --port 9000 \ --env deployment \ diff --git a/perllib/FixMyStreet/DB/Result/Contact.pm b/perllib/FixMyStreet/DB/Result/Contact.pm index 1fa38e8a2..5cf3302dd 100644 --- a/perllib/FixMyStreet/DB/Result/Contact.pm +++ b/perllib/FixMyStreet/DB/Result/Contact.pm @@ -180,10 +180,12 @@ sub disable_form_field { sub sent_by_open311 { my $self = shift; my $body = $self->body; + my $method = $self->send_method || ''; + my $body_method = $body->send_method || ''; return 1 if - (!$body->can_be_devolved && $body->send_method eq 'Open311') - || ($body->can_be_devolved && $body->send_method eq 'Open311' && !$self->send_method) - || ($body->can_be_devolved && $self->send_method eq 'Open311'); + (!$body->can_be_devolved && $body_method eq 'Open311') + || ($body->can_be_devolved && $body_method eq 'Open311' && !$method) + || ($body->can_be_devolved && $method eq 'Open311'); return 0; } |