Removing value check

This commit is contained in:
Ilan Steemers
2020-07-01 14:25:51 +02:00
parent 532199fff3
commit f223cfcb30
2 changed files with 5 additions and 7 deletions
-2
View File
@@ -138,8 +138,6 @@ class Failure(Task):
# Optional Cron validator
def validate_cron(value):
if not value:
return
if not croniter:
raise ImportError(_("Please install croniter to enable cron expressions"))
try:
+5 -5
View File
@@ -102,11 +102,11 @@ def test_scheduler(broker, monkeypatch):
assert cron_schedule.full_clean() is None
assert cron_schedule.__unicode__() == 'django_q.tests.tasks.word_multiply'
with pytest.raises(ValidationError):
cron_schedule = create_schedule('django_q.tests.tasks.word_multiply',
2,
word='django',
schedule_type=Schedule.CRON,
cron="0 22 * * 1-12")
create_schedule('django_q.tests.tasks.word_multiply',
2,
word='django',
schedule_type=Schedule.CRON,
cron="0 22 * * 1-12")
# All other types
for t in Schedule.TYPE:
if t[0] == Schedule.CRON: