Skip to content

Commit

Permalink
Merge pull request #1093 from nextcloud/bugfix/noid/fix-id-selection
Browse files Browse the repository at this point in the history
Fix id selection
  • Loading branch information
nickvergessen authored Oct 19, 2021
2 parents 519c37c + e20c051 commit c5a079c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/BackgroundJob/GenerateUserSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public function __construct(

protected function run($argument): void {
$query = $this->connection->getQueryBuilder();
$query->selectAlias('id', 'max_id')
$query->select('notification_id')
->from('notifications')
->orderBy('id', 'DESC')
->orderBy('notification_id', 'DESC')
->setMaxResults(1);

$result = $query->executeQuery();
Expand Down

0 comments on commit c5a079c

Please sign in to comment.