@eeplatform/basic-edu 1.3.9 → 1.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -4505,7 +4505,6 @@ function useSchoolRepo() {
|
|
|
4505
4505
|
{ key: { name: 1 } },
|
|
4506
4506
|
{ key: { createdAt: 1 } },
|
|
4507
4507
|
{ key: { name: "text" } },
|
|
4508
|
-
{ key: { cityMunicipalityPSGC: 1 }, unique: true, name: "unique_psgc" },
|
|
4509
4508
|
{ key: { id: 1, status: 1 }, unique: true, name: "unique_school_id" }
|
|
4510
4509
|
]);
|
|
4511
4510
|
} catch (error) {
|
|
@@ -33283,14 +33282,20 @@ ${errors.slice(0, 5).join("\n")}${errors.length > 5 ? `
|
|
|
33283
33282
|
session.startTransaction();
|
|
33284
33283
|
const school = schools[i];
|
|
33285
33284
|
try {
|
|
33286
|
-
|
|
33287
|
-
|
|
33288
|
-
|
|
33289
|
-
|
|
33285
|
+
let provincePSGC = "";
|
|
33286
|
+
if (school.province) {
|
|
33287
|
+
const provinceData = await getPSGCByName({
|
|
33288
|
+
name: school.province,
|
|
33289
|
+
type: "Prov"
|
|
33290
|
+
});
|
|
33291
|
+
if (provinceData) {
|
|
33292
|
+
provincePSGC = provinceData.code ?? "";
|
|
33293
|
+
}
|
|
33294
|
+
}
|
|
33290
33295
|
const cityMunPSGC = await getPSGCByName({
|
|
33291
33296
|
name: school.cityMunicipality ?? "",
|
|
33292
33297
|
type: "City",
|
|
33293
|
-
prefix: provincePSGC ? provincePSGC.
|
|
33298
|
+
prefix: provincePSGC ? provincePSGC.toString().slice(0, 5) : ""
|
|
33294
33299
|
});
|
|
33295
33300
|
if (!cityMunPSGC) {
|
|
33296
33301
|
throw new import_nodejs_utils18.BadRequestError(
|