Fixed alias_for column query breaking actor stashes.
This commit is contained in:
@@ -366,11 +366,11 @@ async function queryManticoreSql(filters, options, _reqUser) {
|
|||||||
.innerJoin('actors', 'actors.id', 'actors_stashed.actor_id')
|
.innerJoin('actors', 'actors.id', 'actors_stashed.actor_id')
|
||||||
.where('stash_id', filters.stashId);
|
.where('stash_id', filters.stashId);
|
||||||
} else {
|
} 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) {
|
||||||
if (filters.query.charAt(0) === '#') {
|
if (filters.query.charAt(0) === '#') {
|
||||||
builder.where('id', Number(escape(filters.query.slice(1))));
|
builder.where('id', Number(escape(filters.query.slice(1))));
|
||||||
|
|||||||
Reference in New Issue
Block a user