summaryrefslogtreecommitdiff
path: root/program/management/commands
diff options
context:
space:
mode:
Diffstat (limited to 'program/management/commands')
-rw-r--r--program/management/commands/addnote.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/management/commands/addnote.py b/program/management/commands/addnote.py
index f418e6e..01d891e 100644
--- a/program/management/commands/addnote.py
+++ b/program/management/commands/addnote.py
@@ -17,6 +17,9 @@ class Command(BaseCommand):
start_date = args[1]
status = args[2]
elif len(args) == 4:
+ show_id = args[0]
+ start_date = args[1]
+ status = args[2]
index = args[3]
else:
raise CommandError('you must provide the show_id, start_date, status [index]')
@@ -41,7 +44,7 @@ class Command(BaseCommand):
if not index:
raise CommandError('you must provide the show_id, start_date, status index')
try:
- timeslot = TimeSlot.objects.filter(show=show, start__year=year, start__month=month, start__day=day).order_by('start')[index]
+ timeslot = TimeSlot.objects.filter(show=show, start__year=year, start__month=month, start__day=day).order_by('start')[int(index)]
except IndexError as ie:
raise CommandError(ie)