Skip to content

Add hard limit for amount of returned products#569

Merged
mhieta merged 2 commits intodevelopfrom
fix-too-many-months-for-permit-extension
Feb 28, 2025
Merged

Add hard limit for amount of returned products#569
mhieta merged 2 commits intodevelopfrom
fix-too-many-months-for-permit-extension

Conversation

@tonipel
Copy link
Contributor

@tonipel tonipel commented Jan 29, 2025

Description

Sometimes this function could return one product
more than month_count, add hard limit so more
than month_count products can't be returned.

Context

As far as I know, the bug only occured if permit end date happened to be 29.1.2025.
In such case, if the user would add two or more months to extension request, which
caused extra month to appear.

How Has This Been Tested?

Tested manually.

Manual Testing Instructions for Reviewers

Users should not be able to buy more than 12 months of extension.

Screenshots

Sometimes this function could return one product
more than month_count, add hard limit so more
than month_count products can't be returned.
mhieta
mhieta previously approved these changes Feb 27, 2025
Copy link
Contributor

@mhieta mhieta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 💯

@sonarqubecloud
Copy link

@mhieta mhieta self-requested a review February 28, 2025 18:03
@mhieta mhieta merged commit 8afca1f into develop Feb 28, 2025
3 checks passed
@mhieta mhieta deleted the fix-too-many-months-for-permit-extension branch February 28, 2025 18:05
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.

2 participants