Skip to content

Commit

Permalink
Fixed bad action test.
Browse files Browse the repository at this point in the history
  • Loading branch information
dboulware committed Mar 8, 2022
1 parent 259ad4a commit e91acfc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/schedule/models/schedule_entry.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
from itertools import count

from django.core.validators import MaxValueValidator, MinValueValidator
from django.core.validators import MaxValueValidator, MinValueValidator, ValidationError
from django.db import models

import actions
Expand Down Expand Up @@ -157,9 +157,11 @@ def __init__(self, *args, **kwargs):
if self.next_task_time is None:
self.next_task_time = self.start

# used by .save to detect whether to reset .next_task_time
# used by .save to detect whether to reset .next_task_times
self.__start = self.start
self.__interval = self.interval
if self.action not in actions.registered_actions:
raise ValidationError(self.action + ' does not exist')

def update(self, *args, **kwargs):
super(ScheduleEntry, self).update(*args, **kwargs)
Expand Down

0 comments on commit e91acfc

Please sign in to comment.