Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(assetservice): can't replace metadata if not present in asset #384

Merged
merged 7 commits into from
Dec 5, 2024

Conversation

QuentinRousselet
Copy link
Contributor

What does this PR do ?

This PR allows the edition of a metadata that is not already present on an asset if it exists in its assetModel mappings.

This issue was occurring when the asset model metadatas were updated after the asset had been created. This new metadata field wasn't updatable for the already created asset.

How should this be manually tested?

  • Step 1 :Create an asset
  • Step 2 :Add a new metadatafield in the corresponding assetModel
  • Step 3 :call "action": "replaceMetadata" "controller": "device-manager/assets" with this metadatafield

@QuentinRousselet QuentinRousselet added the bug Something isn't working label Nov 25, 2024
@QuentinRousselet QuentinRousselet self-assigned this Nov 25, 2024
@etrousset etrousset added the 2.5 label Dec 3, 2024
@sebtiz13 sebtiz13 merged commit eb65c0a into 2-dev Dec 5, 2024
5 checks passed
@sebtiz13 sebtiz13 deleted the KZLPRD-679-edit-asset-new-metadata branch December 5, 2024 16:26
github-actions bot pushed a commit that referenced this pull request Dec 5, 2024
# [2.5.0-dev.5](v2.5.0-dev.4...v2.5.0-dev.5) (2024-12-05)

### Bug Fixes

* **assetservice:** can't replace metadata if not present in asset ([#384](#384)) ([eb65c0a](eb65c0a))
github-actions bot pushed a commit that referenced this pull request Dec 5, 2024
# [2.5.0](v2.4.4...v2.5.0) (2024-12-05)

### Bug Fixes

* **assetservice:** can't replace metadata if not present in asset ([#384](#384)) ([eb65c0a](eb65c0a))
* backport fix ([#380](#380)) ([5392b56](5392b56))

### Features

* add editor hint support ([#386](#386)) ([a9b62df](a9b62df))
* **measure:** allow measures to be pushed on Assets via API (no devices) ([#344](#344)) ([c1073c1](c1073c1))
* **softTenants:** add softTenant ids to assets measures documents ([#383](#383)) ([1b36fe0](1b36fe0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.5 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants