def load_extra_state(self, profile):
        """Load extra state for the datagrid."""
        group_name = self.request.GET.get('group', '')
        view = self.request.GET.get('view', self.default_view)
        user = self.request.user

        if view == 'outgoing':
            self.queryset = ReviewRequest.objects.from_user(
                user, user, local_site=self.local_site)
            self.title = _('All Outgoing Review Requests')
        elif view == 'mine':
            self.queryset = ReviewRequest.objects.from_user(
                user, user, None, local_site=self.local_site)
            self.title = _('All My Review Requests')
        elif view == 'to-me':
            self.queryset = ReviewRequest.objects.to_user_directly(
                user, user, local_site=self.local_site)
            self.title = _('Incoming Review Requests to Me')
        elif view in ('to-group', 'to-watched-group'):
            if group_name:
                # to-group is special because we want to make sure that the
                # group exists and show a 404 if it doesn't. Otherwise, we'll
                # show an empty datagrid with the name.
                try:
                    group = Group.objects.get(name=group_name,
                                              local_site=self.local_site)

                    if not group.is_accessible_by(user):
                        raise Http404
                except Group.DoesNotExist:
                    raise Http404

                self.queryset = ReviewRequest.objects.to_group(
                    group_name, self.local_site, user)
                self.title = _('Incoming Review Requests to %s') % group_name
            else:
                self.queryset = ReviewRequest.objects.to_user_groups(
                    user, user, local_site=self.local_site)
                self.title = _('All Incoming Review Requests to My Groups')
        elif view == 'starred':
            self.queryset = self.profile.starred_review_requests.public(
                user=user, local_site=self.local_site, status=None)
            self.title = _('Starred Review Requests')
        elif view == 'incoming':
            self.queryset = ReviewRequest.objects.to_user(
                user, user, local_site=self.local_site)
            self.title = _('All Incoming Review Requests')
        else:
            raise Http404

        if profile and profile.extra_data in 'show_archived':
            self.show_archived = profile.extra_data['show_archived']

        try:
            show = self.request.GET.get('show-archived', self.show_archived)
            self.show_archived = int(show) != 0
        except ValueError:
            pass

        if not self.show_archived:
            hidden_q = ReviewRequestVisit.objects.filter(
                user=user).exclude(visibility=ReviewRequestVisit.VISIBLE)
            hidden_q = hidden_q.values_list('review_request_id', flat=True)

            self.queryset = self.queryset.exclude(pk__in=hidden_q)

        if (profile and
            self.show_archived != profile.extra_data.get('show_archived')):
            profile.extra_data['show_archived'] = self.show_archived
            profile_changed = True
        else:
            profile_changed = False

        self.extra_js_model_data['show_archived'] = self.show_archived

        parent_profile_changed = \
            super(DashboardDataGrid, self).load_extra_state(
                profile, allow_hide_closed=False)

        return profile_changed or parent_profile_changed
dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/datagrids/grids.py/DashboardDataGrid.load_extra_state/swapped operands of `in`