-
Notifications
You must be signed in to change notification settings - Fork 324
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
Send asset downtime status along with asset details #1794
Send asset downtime status along with asset details #1794
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1794 +/- ##
==========================================
+ Coverage 61.36% 61.63% +0.27%
==========================================
Files 211 212 +1
Lines 11587 11666 +79
Branches 1659 1655 -4
==========================================
+ Hits 7110 7190 +80
+ Misses 4205 4180 -25
- Partials 272 296 +24 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes required as per ohcnetwork/care_fe#6952 (review)
listAssetAvailability
queryset to send all related assets record status
@sainak could you review these changes |
add test cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would mean that the "AssetSerializer" can now only be used by "AssetViewset" since the field is annotated in the get_queryset
.
If we were to use the "AssetSerializer" elsewhere, wouldn't this cause issues since we would not/need not be annotating it there.
@sainak is this correct?
LGTM |
@vigneshhari could you review this PR |
It might be better to cache this data in the main record to make the query simpler. |
Proposed Changes
Modify the
AssetAvailabilityViewSet
query set to send the asset uptime status of all assets related to the userAssociated Issue
Partially Fixes #6819
Merge Checklist
/docs
Only PR's with test cases included and passing lint and test pipelines will be reviewed
@coronasafe/care-backend-maintainers @coronasafe/care-backend-admins