Method <code>_validate_unassigned_sites</code> that calls <code>_check_blog_river_templates</code> already executes the query <code>self.instance.sites.exclude(id__in=assigned)</code>. It should be better to iterate over variable <code>unassigned_site_templates </code>(that already holds the site domain and templates for each site). This way it will gain some performance points.