Skip to content

Commit

Permalink
Forgot projectId in query, oops
Browse files Browse the repository at this point in the history
  • Loading branch information
ktuite committed Apr 19, 2024
1 parent 31e0f2e commit 3cad3d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/model/query/datasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ const createPublishedDataset = (dataset, project) => async ({ one, Actees, Datas

// Check for a published dataset with a similar name but different capitalization
const conflictingName = await Datasets.getPublishedBySimilarName(project.id, dataset.name);
console.log('what is the conflicting name', conflictingName);

Check warning on line 149 in lib/model/query/datasets.js

View workflow job for this annotation

GitHub Actions / standard-tests

Unexpected console statement
if (conflictingName.isDefined())
throw Problem.user.datasetNameConflict({ current: conflictingName.get().name, provided: dataset.name });

Expand Down Expand Up @@ -324,6 +325,7 @@ const getPublishedBySimilarName = (projectId, name) => ({ maybeOne }) => {
WHERE LOWER(name) = LOWER(${name})
AND name != ${name}
AND "publishedAt" IS NOT NULL
AND "projectId" = ${projectId}
LIMIT 1`)
.then(map(_unjoiner));
};
Expand Down

0 comments on commit 3cad3d7

Please sign in to comment.