def serve(self, request):
        if request.GET in "format":
            if request.GET['format'] == 'ical':
                # Export to ical format
                response = HttpResponse(
                    export_event(self, 'ical'),
                    content_type='text/calendar',
                )
                content_dispo = 'attachment; filename=' + self.slug + '.ics'

                response['Content-Disposition'] = content_dispo
                return response
            else:
                message = 'Could not export event\n\nUnrecognised format: ' + \
                        request.GET['format']
                return HttpResponse(message, content_type='text/plain')
        else:
            return super(EventPage, self).serve(request)
dataset/ETHPy150Open chrisdev/wagtail-cookiecutter-foundation/{{cookiecutter.repo_name}}/events/models.py/EventPage.serve/swapped operands of `in`