Commit 852844be authored by Luuk Scholten's avatar Luuk Scholten
Browse files

Merge branch 'fix/birthdaycalendar' into 'master'

Fix birthday calendar



See merge request !143
parents 49c2cefc bbbaaf2f
...@@ -29,7 +29,7 @@ class MemberBirthdaySerializer(CalenderJSSerializer): ...@@ -29,7 +29,7 @@ class MemberBirthdaySerializer(CalenderJSSerializer):
def _description(self, instance): def _description(self, instance):
membership = instance.current_membership membership = instance.current_membership
if membership and membership.type == 'honorary': if membership and membership.type == 'honorary':
return instance.membership.get_type_display() return membership.get_type_display()
return '' return ''
def _background_color(self, instance): def _background_color(self, instance):
......
...@@ -44,7 +44,6 @@ class MemberViewset(viewsets.ViewSet): ...@@ -44,7 +44,6 @@ class MemberViewset(viewsets.ViewSet):
.with_birthdays_in_range(start, end) .with_birthdays_in_range(start, end)
.filter(show_birthday=True) .filter(show_birthday=True)
) )
queryset.prefetch_related('membership_get')
all_birthdays = [ all_birthdays = [
self._get_birthdays(m, start, end) self._get_birthdays(m, start, end)
......
Supports Markdown
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