def get_queryset(self):
        """Set AnonymousUser from the database to allow object permissions."""
        if self.request and self.request.user.is_anonymous():
            self.request.user = get_object_or_404(
                User, pk=settings.ANONYMOUS_USER_ID)

        return super(AnonymousUserMixin, self).get_queryset()
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/libs/mixins/anonymous_user_mixin.py/AnonymousUserMixin.get_queryset/original