diff --git a/package.json b/package.json index ea790a1..fae8eb2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bulk-load", "description": "Bulk importing made easy", - "version": "3.24.0", + "version": "3.24.1", "license": "GPL-3.0", "author": "EyeSeeTea team", "homepage": ".", diff --git a/src/data/Dhis2TrackedEntityInstances.ts b/src/data/Dhis2TrackedEntityInstances.ts index 957a32d..8999580 100644 --- a/src/data/Dhis2TrackedEntityInstances.ts +++ b/src/data/Dhis2TrackedEntityInstances.ts @@ -456,12 +456,12 @@ async function getTeisFromApi(options: { const ouModeQuery = ouMode === "SELECTED" || ouMode === "CHILDREN" || ouMode === "DESCENDANTS" - ? { orgUnitMode: ouMode, orgUnit: orgUnits?.map(({ id }) => id) } - : { orgUnitMode: ouMode }; + ? { ouMode: ouMode, orgUnit: orgUnits?.map(({ id }) => id) } + : { ouMode: ouMode }; const filters: TrackedEntityGetRequest = { ...ouModeQuery, - order: "created:asc", + order: "createdAt:asc", program: program.id, pageSize: pageSize, page: page,