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

Disallow updating asset_type #1324

Closed
rithviknishad opened this issue May 29, 2023 · 0 comments · Fixed by #1325
Closed

Disallow updating asset_type #1324

rithviknishad opened this issue May 29, 2023 · 0 comments · Fixed by #1325
Assignees

Comments

@rithviknishad
Copy link
Member

Related to #1319

In the real world, a camera won't become an asset all of a sudden. Also, each asset type is treated differently, like camera assets can be linked with multiple beds. However, an HL7 monitor shouldn't be allowed to be linked with multiple beds.

So, the asset type of an asset should not be modifiable once created.

@rithviknishad rithviknishad self-assigned this May 29, 2023
vigneshhari pushed a commit that referenced this issue Jun 6, 2023
* fixes #1324, disallow asset type modifications

* fixes #1323, rectify bed_is_occupied filter for patient asset bed view

* fixes #1322, cascade delete `AssetBed`

* fixes #1319, disallow linking asset beds of same asset type

* fix queryset delete of AssetBed

* oops, forgot to run the migration :)

* delete assetbed before asset/bed

* only allow setting asset class on creation (or updation if asset class is not set)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant