Skip to content

Commit

Permalink
Update care/facility/models/asset.py
Browse files Browse the repository at this point in the history
Co-authored-by: Aakash Singh <[email protected]>
  • Loading branch information
Ashesh3 and sainak authored Jul 17, 2023
1 parent 3d3aec1 commit 509fffa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions care/facility/models/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,9 @@ class AssetAvailabilityRecord(BaseModel):
Note: A pair of asset and timestamp together should be unique, not just the timestamp alone.
"""

AvailabilityStatusChoices = [(e.value, e.name) for e in AvailabilityStatus]

asset = models.ForeignKey(Asset, on_delete=models.PROTECT, null=False, blank=False)
status = models.IntegerField(
choices=AvailabilityStatusChoices,
choices=AvailabilityStatus.choices,
default=AvailabilityStatus.NOT_MONITORED.value,
)
timestamp = models.DateTimeField(null=False, blank=False)
Expand Down

0 comments on commit 509fffa

Please sign in to comment.