Fix public events calendarjs API

parent 9be88633
...@@ -83,7 +83,9 @@ class EventCalenderJSSerializer(CalenderJSSerializer): ...@@ -83,7 +83,9 @@ class EventCalenderJSSerializer(CalenderJSSerializer):
def _class_names(self, instance): def _class_names(self, instance):
class_names = ["regular-event"] class_names = ["regular-event"]
if services.is_user_registered(self.context["member"], instance): if self.context["member"] and services.is_user_registered(
self.context["member"], instance
):
class_names.append("has-registration") class_names.append("has-registration")
return class_names return class_names
......
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