Fixed alias_for column query breaking actor stashes.

This commit is contained in:
2026-06-09 23:53:00 +02:00
parent 89ca64dd88
commit a47b9a86dc

View File

@@ -366,11 +366,11 @@ async function queryManticoreSql(filters, options, _reqUser) {
.innerJoin('actors', 'actors.id', 'actors_stashed.actor_id')
.where('stash_id', filters.stashId);
} else {
builder.select(knex.raw('*, weight() as _score'));
builder
.select(knex.raw('*, weight() as _score'))
.where('alias_for', 0);
}
builder.where('alias_for', 0);
if (filters.query) {
if (filters.query.charAt(0) === '#') {
builder.where('id', Number(escape(filters.query.slice(1))));