diff --git a/lib/galaxy/managers/sharable.py b/lib/galaxy/managers/sharable.py index aebef5bb039b..20eb3442f72d 100644 --- a/lib/galaxy/managers/sharable.py +++ b/lib/galaxy/managers/sharable.py @@ -222,7 +222,7 @@ def _query_shared_with(self, user, eagerloads=True, **kwargs): Return a query for this model already filtered to models shared with a particular user. """ - query = self.session().query(self.model_class).join("users_shared_with") + query = self.session().query(self.model_class).join(self.model_class.users_shared_with) if eagerloads is False: query = query.enable_eagerloads(False) # TODO: as filter in FilterParser also