diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-02-14 11:50:29 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-02-14 11:50:31 +0000 |
commit | 2530538ca6e36b659a63cc3b67099972fe0116af (patch) | |
tree | 328034494bed370def329a1cfbbd5b1417ed2979 | |
parent | a494edfb9b8b971ef825782123d4422c73288b75 (diff) |
Fix lookup; App not available when run from script
Not caught by test because App is loaded in tests.
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index b68c228b9..489c43090 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -530,7 +530,7 @@ has view_token => ( lazy => 1, default => sub { my $self = shift; - my $token = FixMyStreet::App->model('DB::Token')->create({ + my $token = FixMyStreet::DB->resultset('Token')->create({ scope => 'alert_to_reporter', data => { id => $self->id } }); |