@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eeplatform/basic-edu
2
2
 
3
+ ## 1.3.10
4
+
5
+ ### Patch Changes
6
+
7
+ - b98ccf2: Update indexes
8
+
3
9
  ## 1.3.9
4
10
 
5
11
  ### Patch Changes
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
- const provincePSGC = await getPSGCByName({
33287
- name: school.province ?? "",
33288
- type: "Prov"
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.code.toString().slice(0, 5) : ""
33298
+ prefix: provincePSGC ? provincePSGC.toString().slice(0, 5) : ""
33294
33299
  });
33295
33300
  if (!cityMunPSGC) {
33296
33301
  throw new import_nodejs_utils18.BadRequestError(