Skip to content

Commit

Permalink
responding to pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ktuite committed Mar 28, 2024
1 parent d410b31 commit 093d39e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/model/query/datasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,12 +480,11 @@ const getUnprocessedSubmissions = (datasetId) => ({ all }) =>
const getLastUpdateTimestamp = (datasetId) => ({ maybeOne }) =>
maybeOne(sql`
SELECT "loggedAt" FROM audits
JOIN datasets on audits."acteeId" = datasets."acteeId"
JOIN datasets ON audits."acteeId" = datasets."acteeId"
WHERE datasets."id"=${datasetId}
AND audits."processed" IS NOT NULL
ORDER BY audits."loggedAt" DESC LIMIT 1`)
.then((t) => t.orNull())
.then((t => (t ? t.loggedAt : null)));
.then((t) => (t ? t.loggedAt : null));

module.exports = {
createOrMerge, publishIfExists,
Expand Down

0 comments on commit 093d39e

Please sign in to comment.