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

Fixes 500 when depreciation is active but no purchase date #15161

Merged

Conversation

snipe
Copy link
Owner

@snipe snipe commented Jul 24, 2024

If a user had a license with a depreciation but no purchase date, the system would 500.

This adds validation to make sure that doesn't happen, and also more gracefully fails.

Oh, and tests.

Copy link

what-the-diff bot commented Jul 24, 2024

PR Summary

  • Improved safety checks in depreciation calculations
    We've made an improvement in our depreciation computation where the system checks if a depreciation date is available before performing the calculation. Previously, the system could attempt a calculation without a date, leading to potential errors.

  • Enforced purchase date requirement with depreciation
    The system has been updated to require 'purchase date' when a depreciation ID is provided. This ensures that all necessary data is available for accurate calculations.

  • Expanded license management tests
    Two new test files have been created:

    1. A 'CreateLicenseTest' file that includes tests to verify that proper permissions are needed to view a license, and that the system correctly handles situations when a license is created without a purchase date.
    2. A 'LicenseViewTest' file that contains tests looking at license viewing permissions, how the system handles licenses without a purchase date, and ensuring that the depreciation calculations for a license with a purchase date are accurate.

These tests further strengthen the robustness of our software by proactively checking for potential issues.

@snipe snipe changed the title Fixes/500 when depreciation is active but no purchase date Fixes 500 when depreciation is active but no purchase date Jul 24, 2024
@snipe snipe merged commit 02bd8d7 into develop Jul 24, 2024
8 of 9 checks passed
@snipe snipe deleted the fixes/500_when_depreciation_is_active_but_no_purchase_date branch July 24, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant