Skip to content

Commit 5392b56

Browse files
committed
fix: backport fix (#380)
2 parents 6d46cde + 8818ba3 commit 5392b56

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212

1313
* **measure:** allow measures to be pushed on Assets via API (no devices) ([#344](https://github.com/kuzzleio/kuzzle-device-manager/issues/344)) ([c1073c1](https://github.com/kuzzleio/kuzzle-device-manager/commit/c1073c1f0ccb4cfc7cee64d86c51a4999617fd41))
1414

15+
## [2.4.4](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.4.3...v2.4.4) (2024-11-18)
16+
17+
18+
### Bug Fixes
19+
20+
* getAsset should search in commons assets too ([#380](https://github.com/kuzzleio/kuzzle-device-manager/issues/380)) ([d588a93](https://github.com/kuzzleio/kuzzle-device-manager/commit/d588a93b0dd5b270199083cfb0856e34b57afa66))
21+
1522
## [2.4.3](https://github.com/kuzzleio/kuzzle-device-manager/compare/v2.4.2...v2.4.3) (2024-10-25)
1623

1724

lib/modules/model/ModelService.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,12 @@ export class ModelService extends BaseService {
608608
): Promise<KDocument<AssetModelContent>> {
609609
const query = {
610610
and: [
611-
{ equals: { engineGroup } },
611+
{
612+
or: [
613+
{ equals: { engineGroup } },
614+
{ equals: { engineGroup: "commons" } },
615+
],
616+
},
612617
{ equals: { type: "asset" } },
613618
{ equals: { "asset.model": model } },
614619
],

tests/scenario/modules/models/asset-model.test.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,6 @@ describe("ModelsController:assets", () => {
110110
_id: "model-asset-Plane",
111111
_source: { asset: { model: "Plane" } },
112112
});
113-
114-
const getAssetNotExist = sdk.query({
115-
controller: "device-manager/models",
116-
action: "getAsset",
117-
engineGroup: "other_engine",
118-
model: "Plane",
119-
});
120-
121-
await expect(getAssetNotExist).rejects.toMatchObject({ status: 404 });
122113
});
123114

124115
it("List asset models only from the requested engine group and the common ones", async () => {

0 commit comments

Comments
 (0)