Skip to content
Snippets Groups Projects
Commit 2d153af2 authored by magicfelix's avatar magicfelix
Browse files

Fix field references

parent 5bc38ebe
No related branches found
No related tags found
1 merge request!350Resolve "Add simple course book list"
Pipeline #181018 failed
......@@ -558,7 +558,7 @@ class Documentation(CalendarEvent):
continue
event_reference_obj = event["REFERENCE_OBJECT"]
existing_documentations = event_reference_obj.documentation.filter(
existing_documentations = event_reference_obj.amended_by.filter(
datetime_start=event["DTSTART"].dt,
datetime_end=event["DTEND"].dt,
)
......@@ -635,7 +635,7 @@ class ParticipationStatus(CalendarEvent):
)
def __str__(self) -> str:
return f"{self.documentation}, {self.person}"
return f"{self.related_documentation}, {self.person}"
class Meta:
verbose_name = _("Participation Status")
......
......@@ -10,6 +10,7 @@ from reversion import create_revision, set_comment, set_user
from aleksis.apps.alsijil.util.predicates import can_edit_documentation, is_in_allowed_time_range
from aleksis.apps.chronos.models import LessonEvent
from aleksis.apps.chronos.schema import LessonEventType
from aleksis.apps.cursus.models import Subject
from aleksis.apps.cursus.schema import CourseType, SubjectType
from aleksis.core.models import Person
......@@ -45,6 +46,7 @@ class DocumentationType(PermissionsTypeMixin, DjangoFilterMixin, DjangoObjectTyp
}
course = graphene.Field(CourseType, required=False)
amends = graphene.Field(lambda: LessonEventType, required=False)
subject = graphene.Field(SubjectType, required=False)
future_notice = graphene.Boolean(required=False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment