Skip to content

Commit

Permalink
Removing value check
Browse files Browse the repository at this point in the history
  • Loading branch information
Koed00 committed Jul 1, 2020
1 parent 532199f commit f223cfc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions django_q/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ class Meta:

# Optional Cron validator
def validate_cron(value):
if not value:
return
if not croniter:
raise ImportError(_("Please install croniter to enable cron expressions"))
try:
Expand Down
10 changes: 5 additions & 5 deletions django_q/tests/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f223cfc

Please sign in to comment.