Skip to content

Commit

Permalink
remove extra condition + rename test caption
Browse files Browse the repository at this point in the history
  • Loading branch information
sadiqkhoja committed Dec 9, 2024
1 parent fde9078 commit ac1f237
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/model/query/datasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ const publishIfExists = (formDefId, publishedAt) => async ({ all, context, maybe
JOIN datasets ds ON ds.id = dp."datasetId"
JOIN ds_properties existing_properties ON existing_properties."datasetId" = ds.id
AND LOWER(dp.name) = LOWER(existing_properties.name)
AND dp.name != existing_properties.name
WHERE dpf."formDefId" = ${formDefId}
AND existing_properties."publishedAt" IS NOT NULL
AND dp."publishedAt" IS NULL
Expand Down
2 changes: 1 addition & 1 deletion test/integration/api/datasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -4064,7 +4064,7 @@ describe('datasets and entities', () => {

}));

it('should reject when publishing duplicate property with different capitalization', testService(async (service, container) => {
it('should not reject for existing duplicate properties', testService(async (service, container) => {
const alice = await service.login('alice');

await alice.post('/v1/projects/1/forms?publish=True')
Expand Down

0 comments on commit ac1f237

Please sign in to comment.