cht-conf 6.6.0 → 6.6.1
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,3 +1,10 @@
|
|
|
1
|
+
## [6.6.1](https://github.com/medic/cht-conf/compare/v6.6.0...v6.6.1) (2026-08-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **#821:** ignore deleted primary-contact ref in move-contacts ([#824](https://github.com/medic/cht-conf/issues/824)) ([d9904ef](https://github.com/medic/cht-conf/commit/d9904ef2aa85e0da84263a7e95f01515be37fce6)), closes [#821](https://github.com/medic/cht-conf/issues/821) [#821](https://github.com/medic/cht-conf/issues/821)
|
|
7
|
+
|
|
1
8
|
# [6.6.0](https://github.com/medic/cht-conf/compare/v6.5.2...v6.6.0) (2026-08-21)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -161,7 +161,18 @@ async function assertSourcePrimaryContactType(db, contactTypeInfo, sourceDoc) {
|
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
let sourcePrimaryContactDoc;
|
|
165
|
+
try {
|
|
166
|
+
sourcePrimaryContactDoc = await db.get(sourcePrimaryContactId);
|
|
167
|
+
} catch (err) {
|
|
168
|
+
if (err.status === 404) {
|
|
169
|
+
log.warn(`Source "${sourceDoc._id}" has primary contact "${sourcePrimaryContactId}"` +
|
|
170
|
+
` which is deleted or missing. Ignoring.`);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
throw err;
|
|
174
|
+
}
|
|
175
|
+
|
|
165
176
|
const primaryContactIsPlace = isPlace(contactTypeInfo, sourcePrimaryContactDoc);
|
|
166
177
|
if (primaryContactIsPlace) {
|
|
167
178
|
throw new Error(`Source "${sourceDoc._id}" has primary contact "${sourcePrimaryContactId}" which is of type place`);
|