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

Clone specific fields for 'Normal' type daily rounds #1212

Merged
merged 2 commits into from
Mar 9, 2023

Conversation

Ashesh3
Copy link
Member

@Ashesh3 Ashesh3 commented Mar 9, 2023

Fixes coronasafe/care_fe#5073

Proposed Changes

This PR modifies the clone_last functionality in the DailyRound model to clone only specific fields when the rounds_type is "Normal". Previously, the entire object was cloned, but this caused issues when certain fields were not applicable to the new round.

Associated Issue

@coronasafe/code-reviewers

@Ashesh3 Ashesh3 requested a review from a team as a code owner March 9, 2023 06:48
@sonarcloud
Copy link

sonarcloud bot commented Mar 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: -0.08 ⚠️

Comparison is base (688169f) 56.20% compared to head (24165d0) 56.12%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1212      +/-   ##
==========================================
- Coverage   56.20%   56.12%   -0.08%     
==========================================
  Files         174      174              
  Lines        8812     8826      +14     
  Branches     1521     1525       +4     
==========================================
+ Hits         4953     4954       +1     
- Misses       3805     3818      +13     
  Partials       54       54              
Impacted Files Coverage Δ
care/facility/api/serializers/daily_round.py 34.45% <0.00%> (-2.50%) ⬇️
care/facility/api/serializers/file_upload.py 41.93% <0.00%> (-0.35%) ⬇️
...re/facility/management/commands/load_dummy_data.py 0.00% <0.00%> (ø)
care/facility/api/viewsets/asset.py 55.61% <0.00%> (+0.25%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@nihal467
Copy link
Member

nihal467 commented Mar 9, 2023

@vigneshhari @gigincg @khavinshankar can you review this PR ASAP

@nihal467 nihal467 added the P1 High priority; urgent label Mar 9, 2023
@vigneshhari vigneshhari merged commit 2a7c6f7 into coronasafe:master Mar 9, 2023
Ashesh3 added a commit to Ashesh3/care that referenced this pull request Mar 22, 2023
* Selective copy for normal daily round

* Formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 High priority; urgent waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Log update is malfunctioning in patient consultation form
4 participants