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

Fix claim limit unique key error due to max_visits #388

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

pxwxnvermx
Copy link
Contributor

@pxwxnvermx pxwxnvermx commented Sep 5, 2024

QA-Ticket

This bug was recently found in QA. The code throws a unique key error because it tries to create an already-created Claim Limit configuration due to the max_visits filter in get_or_create. The max_visits are only required when a new ClaimLimit is created, so moving it to the defaults parameter of get_or_create avoids the unique key error and adds max_visits specified to any new claim limits that are created.

@pxwxnvermx pxwxnvermx merged commit 8bedd96 into main Sep 9, 2024
2 checks passed
@pxwxnvermx pxwxnvermx deleted the pkv/fix-claim-limit-error branch September 9, 2024 09:00
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.

3 participants