From 8be2c4b6d24beeabc8cb5f643af72f12ba1b4284 Mon Sep 17 00:00:00 2001 From: DingDongSoLong4 <99329275+DingDongSoLong4@users.noreply.github.com> Date: Fri, 11 Aug 2023 02:31:56 +0200 Subject: [PATCH] Fix performer tag sort (#4018) * Fix performer tag sort * Fix entirely unrelated test --- internal/identify/scene_test.go | 3 +-- pkg/sqlite/performer.go | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/identify/scene_test.go b/internal/identify/scene_test.go index 3f2913455..ae6963ee3 100644 --- a/internal/identify/scene_test.go +++ b/internal/identify/scene_test.go @@ -1,7 +1,6 @@ package identify import ( - "context" "errors" "reflect" "strconv" @@ -770,7 +769,7 @@ func Test_sceneRelationships_cover(t *testing.T) { }, } - got, err := tr.cover(context.TODO()) + got, err := tr.cover(testCtx) if (err != nil) != tt.wantErr { t.Errorf("sceneRelationships.cover() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/pkg/sqlite/performer.go b/pkg/sqlite/performer.go index e4bd7bb9a..15a5f384a 100644 --- a/pkg/sqlite/performer.go +++ b/pkg/sqlite/performer.go @@ -1034,7 +1034,9 @@ func (qb *PerformerStore) tagsRepository() *joinRepository { tableName: performersTagsTable, idColumn: performerIDColumn, }, - fkColumn: tagIDColumn, + fkColumn: tagIDColumn, + foreignTable: tagTable, + orderBy: "tags.name ASC", } }