Skip to content
Snippets Groups Projects

cron jobs should be killed if hang

Merged Piotr Gawron requested to merge 200-cron-jobs-should-be-killed-if-hang into master
All threads resolved!
2 files
+ 3
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -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
Loading