forked from DebaucheryLibrarian/traxxx
Fixed existing stash selection in transfer tool.
This commit is contained in:
@@ -7,9 +7,12 @@ async function getStashId(stash, user) {
|
||||
.select('id')
|
||||
.where('user_id', user.id)
|
||||
.where((builder) => {
|
||||
builder
|
||||
.where('slug', stash.slug)
|
||||
.orWhere('primary', stash.primary);
|
||||
if (stash.primary) {
|
||||
builder.where('primary', true);
|
||||
return;
|
||||
}
|
||||
|
||||
builder.where('slug', stash.slug);
|
||||
})
|
||||
.first();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user