fix error when there are no slugs in the current changeset
@@ -219,6 +219,7 @@ class ChangeSet(models.Model):
slugs.add(slug)
qs = LocationSlug.objects.filter(slug__in=slugs)
+ if slugs:
qs = qs.filter(reduce(operator.or_, (Q(slug__startswith=slug+'__') for slug in slugs)))
existing_slugs = dict(qs.values_list('slug', 'redirect__target_id'))
