Skip to content

Commit

Permalink
allow cameras to be linked to multiple beds
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Oct 22, 2024
1 parent 182b539 commit d70f6c2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions care/facility/api/serializers/bed.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,10 @@ def validate(self, attrs):
{"asset": "Should be in the same facility as the bed"}
)
if (
asset.asset_class
in [
AssetClasses.HL7MONITOR.name,
AssetClasses.ONVIF.name,
]
asset.asset_class == AssetClasses.HL7MONITOR.name
and AssetBed.objects.filter(
bed=bed, asset__asset_class=asset.asset_class
).exists()
) and AssetBed.objects.filter(
bed=bed, asset__asset_class=asset.asset_class
).exists():
Expand Down

0 comments on commit d70f6c2

Please sign in to comment.