Fix stupid mistakes.
This commit is contained in:
parent
63e34ce387
commit
31f74fa010
|
@ -9,22 +9,22 @@ def add_teams_to_categories(apps, schema_editor):
|
|||
Camp = apps.get_model("camps", "Camp")
|
||||
|
||||
# 2016 - Everything is orga team
|
||||
camp2016 = Camp.objects.filter(slug="bornhack-2016")
|
||||
orga2016 = Team.objects.filter(camp=camp2016, name="Orga")
|
||||
camp2016 = Camp.objects.get(slug="bornhack-2016")
|
||||
orga2016 = Team.objects.get(camp=camp2016, name="Orga")
|
||||
InfoCategory.objects.filter(camp=camp2016).update(team=orga2016)
|
||||
|
||||
# 2017 - Everything is orga team
|
||||
camp2017 = Camp.objects.filter(slug="bornhack-2017")
|
||||
orga2017 = Team.objects.filter(camp=camp2017, name="Orga")
|
||||
camp2017 = Camp.objects.get(slug="bornhack-2017")
|
||||
orga2017 = Team.objects.get(camp=camp2017, name="Orga")
|
||||
InfoCategory.objects.filter(camp=camp2017).update(team=orga2017)
|
||||
|
||||
# 2018 - Map categories to teams
|
||||
camp2018 = Camp.objects.filter(slug="bornhack-2018")
|
||||
camp2018 = Camp.objects.get(slug="bornhack-2018")
|
||||
team2018 = Team.objects.filter(camp=camp2018)
|
||||
infocategories2018 = InfoCategory.objects.filter(camp=camp2018)
|
||||
|
||||
# Info team
|
||||
infoteam = team2018.filter(name="Info")
|
||||
infoteam = team2018.get(name="Info")
|
||||
info_anchors = [
|
||||
"what",
|
||||
"when",
|
||||
|
@ -40,23 +40,23 @@ def add_teams_to_categories(apps, schema_editor):
|
|||
infocategories2018.filter(anchor__in=info_anchors).update(team=infoteam)
|
||||
|
||||
# Food team
|
||||
food = team2018.filter(name="Food")
|
||||
food = team2018.get(name="Food")
|
||||
infocategories2018.filter(anchor_in=["food-and-groceries"]).update(team=food)
|
||||
|
||||
# NOC team
|
||||
noc = team2018.filter(name="NOC")
|
||||
noc = team2018.get(name="NOC")
|
||||
infocategories2018.filter(anchor__in=["network"]).update(team=noc)
|
||||
|
||||
# Power team
|
||||
power = team2018.filter(name="Power")
|
||||
power = team2018.get(name="Power")
|
||||
infocategories2018.filter(anchor__in=["power"]).update(team=power)
|
||||
|
||||
# Shuttle bus
|
||||
shuttle_bus = team2018.filter(name="Shuttle Bus")
|
||||
shuttle_bus = team2018.get(name="Shuttle Bus")
|
||||
infocategories2018.filter(anchor__in=["shuttle-bus"]).update(team=shuttle_bus)
|
||||
|
||||
# Bar
|
||||
bar = team2018.filter(name="Bar")
|
||||
bar = team2018.get(name="Bar")
|
||||
infocategories2018.filter(anchor__in=["bar"]).update(team=bar)
|
||||
|
||||
|
||||
|
@ -67,5 +67,5 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPyton(add_teams_to_categories)
|
||||
migrations.RunPython(add_teams_to_categories)
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue