summaryrefslogtreecommitdiff
path: root/program/management/commands
diff options
context:
space:
mode:
Diffstat (limited to 'program/management/commands')
-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()