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

Update service free allowance when organisation type change #4371

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

spatel033
Copy link
Contributor

@spatel033 spatel033 commented Feb 4, 2025

Update the free allowance when updating organisation type. If the service free allowance has been updated manually then it should keep the manual allowance, this requirement should be handled as part of this story. More details on this card.

Update the free allowance when updating organisation type. If the service free allowance has been updated manually then it should keep the manual allowance.
@spatel033 spatel033 force-pushed the update-service-free-allowance branch from ac2f126 to bbcad60 Compare February 4, 2025 14:09
@@ -158,6 +160,11 @@ def _update_organisation_services(organisation, attribute, only_where_none=True)
db.session.add(service)


def _update_organisation_services_free_allowance(organisation):
for service in organisation.services:
set_default_free_allowance_for_service(service, year_start=None)
Copy link
Contributor

Choose a reason for hiding this comment

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

This function only keeps the manual free allowances if they're 0, but not if they're any other value - it sounds like this isn't what we want to happen?

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