Skip to content

Conversation

berinhard
Copy link
Contributor

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 March 3, 2022 21:37
@ewdurbin ewdurbin merged commit ceb0bf9 into main Mar 29, 2022
@ewdurbin ewdurbin deleted the feature/do-not-display-overlaps branch March 29, 2022 21:12
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