diff --git a/program/serializers.py b/program/serializers.py index e9481b51e98b1e21286d2a00ee5fbee7366fbc7f..24d20e62b5b60bd21be565cde4432467f2fa5739 100644 --- a/program/serializers.py +++ b/program/serializers.py @@ -1038,7 +1038,7 @@ class TimeSlotSerializer(serializers.ModelSerializer): def to_representation(self, instance): representation = super().to_representation(instance) - if not self.context.get("request").user.is_authenticated: + if not (self.context.get("request") and self.context.get("request").user.is_authenticated): del representation["memo"] return representation