diff --git a/backend/api/migrations/0012_update_signing_authority_declaration_statement.py b/backend/api/migrations/0012_update_signing_authority_declaration_statement.py new file mode 100644 index 000000000..808e077a1 --- /dev/null +++ b/backend/api/migrations/0012_update_signing_authority_declaration_statement.py @@ -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), + ] diff --git a/frontend/src/credit_transfers/components/CreditTransferFormDetails.js b/frontend/src/credit_transfers/components/CreditTransferFormDetails.js index 8c8c68f30..c9791a8a5 100644 --- a/frontend/src/credit_transfers/components/CreditTransferFormDetails.js +++ b/frontend/src/credit_transfers/components/CreditTransferFormDetails.js @@ -51,7 +51,7 @@ class CreditTransferFormDetails extends Component { onChange={this.props.handleInputChange} required="required" > - + {this.props.fuelSuppliers && this.props.fuelSuppliers.map(organization => ( this.props.fields.initiator.id !== organization.id &&