updates wording and fixes get or create logic
This commit is contained in:
parent
8be9e91d21
commit
193a1c7d54
3 changed files with 5 additions and 3 deletions
|
@ -77,6 +77,8 @@ class Dashboard(View):
|
|||
def post(self, request):
|
||||
"""Create a schedule task to check for updates"""
|
||||
schedule_form = forms.IntervalScheduleForm(request.POST)
|
||||
if not schedule_form.is_valid():
|
||||
raise schedule_form.ValidationError(schedule_form.errors)
|
||||
|
||||
with transaction.atomic():
|
||||
schedule, _ = IntervalSchedule.objects.get_or_create(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue