summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2016-01-06 20:17:43 (GMT)
committerErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2016-01-06 20:17:43 (GMT)
commit7abeccf4a01c3340610e9c92b7ecfdb4e00a2171 (patch)
tree714918b39818a18076d96301111264305b6dc826 /program
parent10d92b42bd5bb174e37076a83d4af047e733155c (diff)
fixed command
Diffstat (limited to 'program')
-rw-r--r--program/management/commands/update_hosts.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/program/management/commands/update_hosts.py b/program/management/commands/update_hosts.py
index e19d8ed..64619cd 100644
--- a/program/management/commands/update_hosts.py
+++ b/program/management/commands/update_hosts.py
@@ -8,14 +8,14 @@ class Command(NoArgsCommand):
def handle_noargs(self, **options):
for host in Host.objects.all():
+ is_active = None
for show in host.shows.all():
- is_active = None
if show.is_active:
is_active = True
else:
is_active = False
- host.is_active = is_active
+ host.is_active = is_active
- if not is_active:
- host.save()
+ if not is_active:
+ host.save()