Skip to content
Snippets Groups Projects
Commit 2c1d1dc9 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

multiple === operators changed into "in" operator

parent 5887818c
No related branches found
No related tags found
1 merge request!141Changes asked in !135
......@@ -8,7 +8,7 @@ from django.utils import timezone
from web.algorithm import VerhoeffAlgorithm
from web.forms.forms import DATEPICKER_DATE_ATTRS
from web.models import VoucherType, VoucherTypePrice, Voucher, Worker
from web.models.constants import VOUCHER_STATUS_NEW, VOUCHER_STATUS_USED, VOUCHER_STATUS_EXPIRED
from web.models.constants import VOUCHER_STATUS_USED, VOUCHER_STATUS_EXPIRED
from web.models.worker_study_role import WORKER_VOUCHER_PARTNER
logger = logging.getLogger(__name__)
......@@ -58,7 +58,7 @@ class VoucherForm(ModelForm):
self.fields['hours'].widget.attrs['readonly'] = True
self.fields['usage_partner'].widget.attrs['readonly'] = True
if instance.status == VOUCHER_STATUS_USED or instance.status == VOUCHER_STATUS_EXPIRED:
if instance.status in [VOUCHER_STATUS_USED, VOUCHER_STATUS_EXPIRED]:
self.fields['status'].widget.attrs['readonly'] = True
self.fields['feedback'].widget.attrs['readonly'] = True
......
......@@ -61,7 +61,7 @@
</form>
{% if voucher.id %}
<h3 class="box-title">List of voucher partner sessions
{% if voucher.status == 'NEW' or voucher.status == 'IN_USE' %}
{% if voucher.status in 'NEW,IN_USE' %}
<a title="add a new voucher partner session"
id="add-voucher-partner-session"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment