Skip to content

Commit

Permalink
Only update 'lastupdated' when the update is new.
Browse files Browse the repository at this point in the history
  • Loading branch information
neprune committed Jan 29, 2025
1 parent fea0f9e commit 3dd7a67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion perllib/Open311/UpdatesBase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,9 @@ sub _process_update {
# insertion. We also then need a clone, otherwise the setting of lastupdate
# will *also* reshift comment->created's time zone to TIME_ZONE.
my $created = $comment->created->set_time_zone(FixMyStreet->local_time_zone);
$p->lastupdate($created->clone);
if ($created > $p->lastupdate) {
$p->lastupdate($created->clone);
}

return $comment unless $self->commit;

Expand Down

0 comments on commit 3dd7a67

Please sign in to comment.