-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: updated transfer labels for BCeID users according to new Act
This commit makes the following updates to the New Transfer page for BCeID users, ensuring alignment with the new Act: - Change the dropdown label from 'Select a Fuel Supplier' to 'Select an Organization'. - The signing authority declaration statement is now updated to: 'I confirm that records evidencing each matter reported under section 17 of the Low Carbon Fuel (General) Regulation are available on request.' Additionally, a database migration is added to apply the signing authority declaration statement label change within the existing record. Closes #2690
- Loading branch information
1 parent
e8233a6
commit 1b18f72
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
backend/api/migrations/0012_update_signing_authority_declaration_statement.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import logging | ||
from django.db import migrations | ||
|
||
def update_sign_auth_assertion(apps, schema_editor): | ||
""" | ||
Updates the signing authority declaration statement | ||
Previous label: | ||
"I confirm that records evidencing each matter reported under section 11.11 (2) of the | ||
Regulation are available on request." | ||
New label: | ||
"I confirm that records evidencing each matter reported under section 17 of the Low Carbon | ||
Fuel (General) Regulation are available on request." | ||
""" | ||
signing_authority_assertion = apps.get_model('api', 'SigningAuthorityAssertion') | ||
try: | ||
assertion = signing_authority_assertion.objects.get(id=1) | ||
assertion.description = ( | ||
'I confirm that records evidencing each matter reported under section 17 ' | ||
'of the Low Carbon Fuel (General) Regulation are available on request.' | ||
) | ||
assertion.save() | ||
except signing_authority_assertion.DoesNotExist: | ||
logging.error('Failed to update SigningAuthorityAssertion: No entry found with id "1".') | ||
|
||
class Migration(migrations.Migration): | ||
""" | ||
Attaches the update function to the migration operations | ||
""" | ||
dependencies = [ | ||
('api', '0011_report_history_grouping'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(update_sign_auth_assertion), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters