diff --git a/aleksis/core/mixins.py b/aleksis/core/mixins.py index c331b0cf1df9aeacad3a7b5f3305a67a7e1c30f4..22c16d3469a1e07070c309115078fa55b5bf6dd7 100644 --- a/aleksis/core/mixins.py +++ b/aleksis/core/mixins.py @@ -726,9 +726,10 @@ class CalendarEventMixin(DAVResource, RegistryObject, is_registry=True): The list of objects used to create the calendar feed have to be provided by the method `get_objects` class method. It's mandatory to implement this method. - The list of objects whose respective events should be marked as blocking the respective - entities passed to it (persons, groups, ...) have to be provided by the `get_busy_objects` - class method. If the method is not implemented, no objects will be marked. + The list of objects whose respective events should be marked as being relevant to the + availability of the respective entities passed to it (persons, groups, ...) have to be + provided by the `get_availability_objects` class method. If the method is not implemented, + no objects will be marked. To provide the data for the events, a certain set of class methods can be implemented. The following iCal attributes are supported: @@ -886,7 +887,7 @@ class CalendarEventMixin(DAVResource, RegistryObject, is_registry=True): return qs @classmethod - def get_busy_objects(cls, request: HttpRequest, obj) -> Iterable: + def get_availability_objects(cls, request: HttpRequest, obj) -> Iterable: """Return the objects whose events should be marked as blocking.""" return None diff --git a/aleksis/core/models.py b/aleksis/core/models.py index 9205d186b8471ee61f30ea037f42b94f083790e4..82284ff5294bb15cbc8ea0b7ee5e7cd16d890070 100644 --- a/aleksis/core/models.py +++ b/aleksis/core/models.py @@ -1739,13 +1739,13 @@ class CalendarEvent( calendar_alarm.get_alarm(request) for calendar_alarm in reference_object.alarms.all() ] - def get_availability_persons(self) -> QuerySet: + def get_availability_persons(self) -> list[Person]: """Return the persons whose availability is affected by the event.""" - raise NotImplementedError() + return [] - def get_availability_groups(self) -> QuerySet: + def get_availability_groups(self) -> list[Group]: """Return the groups whose availability is affected by the event.""" - raise NotImplementedError() + return [] @classmethod def get_objects(