Skip to content

Commit

Permalink
added custom cron field for 6.5 feature in sync plan (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
omkarkhatavkar authored and ldjebran committed Sep 14, 2018
1 parent 7a0c40a commit 7a3002d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions nailgun/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
from sys import version_info
import hashlib
import os.path

from fauxfactory import gen_alphanumeric
from fauxfactory import gen_alphanumeric, gen_choice
from packaging.version import Version

from nailgun import client, entity_fields, signals
Expand Down Expand Up @@ -6397,7 +6396,8 @@ def __init__(self, server_config=None, **kwargs):
'description': entity_fields.StringField(),
'enabled': entity_fields.BooleanField(required=True),
'interval': entity_fields.StringField(
choices=('hourly', 'daily', 'weekly'),
choices=('hourly', 'daily', 'weekly', 'custom cron'),
default=gen_choice(('hourly', 'daily', 'weekly')),
required=True,
),
'name': entity_fields.StringField(
Expand All @@ -6406,6 +6406,9 @@ def __init__(self, server_config=None, **kwargs):
length=(6, 12),
unique=True
),
'cron_expression': entity_fields.StringField(
str_type='alpha'
),
'organization': entity_fields.OneToOneField(
Organization,
required=True,
Expand Down

0 comments on commit 7a3002d

Please sign in to comment.