Don't use service default postage, but template postage instead

This commit is contained in:
Pea Tyczynska
2019-02-04 17:28:14 +00:00
parent 64aff0ba05
commit b07f16b9a0
4 changed files with 3 additions and 6 deletions

View File

@@ -390,7 +390,7 @@ def get_job_partials(job, template):
if notifications['notifications']:
postage = notifications['notifications'][0]['postage']
else:
postage = current_service.postage
postage = template['postage']
counts = render_template(
'partials/jobs/count-letters.html',

View File

@@ -83,7 +83,6 @@ class ServiceAPIClient(NotifyAdminAPIClient):
'free_sms_fragment_limit',
'prefix_sms',
'contact_link',
'postage',
}
if disallowed_attributes:
raise TypeError('Not allowed to update service attributes: {}'.format(

View File

@@ -22,12 +22,10 @@
</a>
</div>
{% endif %}
{% if current_service.has_permission("choose_postage") %}
<div class="column-whole" id="postage">
<h2 class="heading-small heading-inline">Postage</h2>:
{{ template_postage or current_service.postage }} class
</div>
{% endif %}
{% else %}
{% if current_user.has_permissions('send_messages', restrict_admin_usage=True) %}
<div class="column-half">