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

Added validations for create asset #1125

Merged
merged 2 commits into from
Jan 20, 2023

Conversation

Pranshu1902
Copy link
Contributor

Fixes #1124
Added validations to ensure that the warranty_amc_end_of_validity is not in the past and the last_serviced_on is not in the future when creating or updating an asset.

@Pranshu1902 Pranshu1902 requested a review from a team as a code owner December 22, 2022 09:34
@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2022

Codecov Report

Base: 55.66% // Head: 55.64% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (4753d60) compared to base (4b47412).
Patch coverage: 14.28% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1125      +/-   ##
==========================================
- Coverage   55.66%   55.64%   -0.02%     
==========================================
  Files         177      177              
  Lines        8767     8780      +13     
  Branches     1504     1509       +5     
==========================================
+ Hits         4880     4886       +6     
- Misses       3835     3842       +7     
  Partials       52       52              
Impacted Files Coverage Δ
care/facility/api/serializers/asset.py 65.82% <14.28%> (-5.02%) ⬇️
config/settings/deployment.py 0.00% <0.00%> (ø)
care/facility/models/facility.py 86.30% <0.00%> (ø)
care/facility/models/json_schema/asset.py 100.00% <0.00%> (ø)
care/facility/api/viewsets/asset.py 55.11% <0.00%> (+0.25%) ⬆️
care/users/api/viewsets/users.py 54.26% <0.00%> (+0.85%) ⬆️
care/facility/api/viewsets/file_upload.py 50.00% <0.00%> (+1.42%) ⬆️

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.

@sonarcloud
Copy link

sonarcloud bot commented Dec 28, 2022

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vigneshhari vigneshhari merged commit 912bd36 into coronasafe:master Jan 20, 2023
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 this pull request may close these issues.

Add Validations for create asset
3 participants