diff --git a/lib/galaxy/webapps/base/controller.py b/lib/galaxy/webapps/base/controller.py index bc1b36069f93..f3fc7603931a 100644 --- a/lib/galaxy/webapps/base/controller.py +++ b/lib/galaxy/webapps/base/controller.py @@ -1316,7 +1316,7 @@ def set_slug_async(self, trans, id, new_slug): item = self.get_item(trans, id) if item: # Only update slug if slug is not already in use. - if trans.sa_session.query(item.__class__).filter_by(user=item.user, slug=new_slug).count() == 0: + if not slug_exists(trans.sa_session, item.__class__, item.user, new_slug): item.slug = new_slug with transaction(trans.sa_session): trans.sa_session.commit()