              kwargs['help_text'] = ''
          elif db_field.name in (list(self.filter_vertical) + list(self.filter_horizontal)):
              kwargs['widget'] = widgets.FilteredSelectMultiple(db_field.verbose_name, (db_field.name in self.filter_vertical))
  
          queryset = self.get_field_queryset(db, db_field, request)
          if queryset is not None:
              kwargs['queryset'] = queryset
  
          return db_field.formfield(**kwargs)
  
      def get_view_on_site_url(self, obj=None):
          if obj is None or not self.view_on_site:
 
</s> remove         queryset = self.get_field_queryset(db, db_field, request)
        if queryset is not None:
            kwargs['queryset'] = queryset
 </s> add         if not 'queryset' in kwargs:
            queryset = self.get_field_queryset(db, db_field, request)
            if queryset is not None:
                kwargs['queryset'] = queryset
        if not 'queryset' in kwargs:
            queryset = self.get_field_queryset(db, db_field, request)
            if queryset is not None:
                kwargs['queryset'] = queryset
              kwargs['help_text'] = ''
          elif db_field.name in (list(self.filter_vertical) + list(self.filter_horizontal)):
              kwargs['widget'] = widgets.FilteredSelectMultiple(db_field.verbose_name, (db_field.name in self.filter_vertical))
  
        if not 'queryset' in kwargs:
            queryset = self.get_field_queryset(db, db_field, request)
            if queryset is not None:
                kwargs['queryset'] = queryset
        if not 'queryset' in kwargs:
            queryset = self.get_field_queryset(db, db_field, request)
            if queryset is not None:
                kwargs['queryset'] = queryset
        if not 'queryset' in kwargs:
            queryset = self.get_field_queryset(db, db_field, request)
            if queryset is not None:
                kwargs['queryset'] = queryset
  
          return db_field.formfield(**kwargs)
  
      def get_view_on_site_url(self, obj=None):
          if obj is None or not self.view_on_site:
keep keep keep keep replace replace replace keep keep keep keep keep
 Fixed #21405 -- Prevented queryset overwrite in BaseModelAdmin

Thanks guido@20tab.com for the report and Tim Graham for the
analyze. 
django/contrib/admin/options.py