@labdigital/commercetools-mock 2.62.0 → 2.62.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/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/repositories/helpers.ts +4 -6
package/package.json
CHANGED
|
@@ -10,7 +10,6 @@ import type {
|
|
|
10
10
|
AssociateRoleResourceIdentifier,
|
|
11
11
|
BaseAddress,
|
|
12
12
|
BusinessUnitKeyReference,
|
|
13
|
-
BusinessUnitReference,
|
|
14
13
|
BusinessUnitResourceIdentifier,
|
|
15
14
|
CentPrecisionMoney,
|
|
16
15
|
CustomFields,
|
|
@@ -323,18 +322,17 @@ export const getBusinessUnitKeyReference = (
|
|
|
323
322
|
};
|
|
324
323
|
}
|
|
325
324
|
|
|
326
|
-
const
|
|
327
|
-
id,
|
|
325
|
+
const resource = storage.getByResourceIdentifier<"business-unit">(
|
|
328
326
|
projectKey,
|
|
329
|
-
|
|
327
|
+
id,
|
|
330
328
|
);
|
|
331
329
|
|
|
332
|
-
if (!
|
|
330
|
+
if (!resource?.key) {
|
|
333
331
|
throw new Error("No business-unit found for reference");
|
|
334
332
|
}
|
|
335
333
|
|
|
336
334
|
return {
|
|
337
335
|
typeId: "business-unit",
|
|
338
|
-
key:
|
|
336
|
+
key: resource.key,
|
|
339
337
|
};
|
|
340
338
|
};
|