Commit 7b13d654 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg

Fix migrations for 2016 general meetings

parent 07d802fd
...@@ -24,7 +24,7 @@ class Command(legacylogin.Command): ...@@ -24,7 +24,7 @@ class Command(legacylogin.Command):
print("Migrating the general meetings") print("Migrating the general meetings")
url = "https://thalia.nu/ajax/alvyearview?year={}" url = "https://thalia.nu/ajax/alvyearview?year={}"
for year in range(1990, 2016): for year in range(1990, 2017):
print("Migrating {}".format(year)) print("Migrating {}".format(year))
src = self.session.get(url.format(year)).text src = self.session.get(url.format(year)).text
soup = BeautifulSoup(src, 'lxml') soup = BeautifulSoup(src, 'lxml')
......
...@@ -28,7 +28,7 @@ def index(request): ...@@ -28,7 +28,7 @@ def index(request):
except ValueError: except ValueError:
docs.remove(doc) docs.remove(doc)
meeting_years = {x: [] for x in range(1990, timezone.now().year)} meeting_years = {x: [] for x in range(1990, timezone.now().year + 1)}
for obj in GeneralMeeting.objects.all(): for obj in GeneralMeeting.objects.all():
meeting_years[datetime_to_lectureyear(obj.datetime)].append(obj) meeting_years[datetime_to_lectureyear(obj.datetime)].append(obj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment