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

AssetBeds should be unique together by Asset, Asset Type and Bed #1319

Closed
rithviknishad opened this issue May 29, 2023 · 1 comment · Fixed by #1325
Closed

AssetBeds should be unique together by Asset, Asset Type and Bed #1319

rithviknishad opened this issue May 29, 2023 · 1 comment · Fixed by #1325
Assignees
Labels

Comments

@rithviknishad
Copy link
Member

Describe the bug
Currently, we are able to link multiple assets of the same type (say multiple HL7 monitors) to the same bed.

To Reproduce
Steps to reproduce the behavior:

  1. Create a bed
  2. Create two assets of type: HL7 Monitors
  3. Configure the two assets to use the created bed.

Expected behavior
The backend should raise a validation error to prevent linking multiple assets of same asset type to a single bed.

@rithviknishad rithviknishad self-assigned this May 29, 2023
@rithviknishad
Copy link
Member Author

We can't have this validation for camera's as each bed preset creates new AssetBed record.

We might also need to restrict editing asset_type once an asset is created so that a Camera asset with multiple beds should never be updated to be a monitor as it shouldn't be linked with multiple bed.

cc: @gigincg @vigneshhari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant