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

Do not display repeated sponsorship applications #2003

Merged
merged 9 commits into from Mar 29, 2022

Conversation

berinhard
Copy link
Collaborator

@berinhard berinhard commented Mar 3, 2022

This PR updates the logic that executes a new sponsorship contract to query for existing and active applications from that same sponsor and "deactivate" them.

The sponsorship model now has a new FK called overlapped_by to flag these existing applications as overlapped by the new one. Beyond enabling us to understand which application replaces another, this FK is also being used to control which sponsorships should be considered as active ones. If this FK is populated, the application gets excluded from the Sponsorship.objects.enabled() queryset, even though it is finalized and has a valid start/end date range.

@berinhard berinhard requested a review from ewdurbin Mar 3, 2022
@ewdurbin ewdurbin merged commit ceb0bf9 into main Mar 29, 2022
2 checks passed
@ewdurbin ewdurbin deleted the feature/do-not-display-overlaps branch Mar 29, 2022
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.

None yet

2 participants