enforce JT/Job.timeout >= 0

see: https://github.com/ansible/tower/issues/2421
This commit is contained in:
Ryan Petrello
2018-07-09 17:11:02 -04:00
parent 9c653cb603
commit 1fb41cf8d0
2 changed files with 28 additions and 1 deletions

View File

@@ -134,7 +134,7 @@ class JobOptions(BaseModel):
allow_simultaneous = models.BooleanField(
default=False,
)
timeout = models.IntegerField(
timeout = models.PositiveIntegerField(
blank=True,
default=0,
help_text=_("The amount of time (in seconds) to run before the task is canceled."),