diff options
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 25798edca..f5601639a 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -192,7 +192,7 @@ Return most recent ModerationLog object sub latest_moderation_log_entry { my $self = shift; - return $self->admin_log_entries->search({ action => 'moderation' }, { order_by => 'id desc' })->first; + return $self->admin_log_entries->search({ action => 'moderation' }, { order_by => { -desc => 'id' } })->first; } __PACKAGE__->has_many( diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index 13a9c52cd..010b7755b 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -814,7 +814,7 @@ Return most recent ModerationLog object sub latest_moderation_log_entry { my $self = shift; - return $self->admin_log_entries->search({ action => 'moderation' }, { order_by => 'id desc' })->first; + return $self->admin_log_entries->search({ action => 'moderation' }, { order_by => { -desc => 'id' } })->first; } sub photos { |