1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-04 17:59:48 +00:00

fix: user querying fails on global audit log page with Postgres

This commit is contained in:
Elias Schneider
2025-04-18 18:33:14 +02:00
parent 983e989be1
commit 84f1d5c906

View File

@@ -164,8 +164,8 @@ func (s *AuditLogService) ListUsernamesWithIds(ctx context.Context) (users map[s
WithContext(ctx).
Joins("User").
Model(&model.AuditLog{}).
Select("DISTINCT User.id, User.username").
Where("User.username IS NOT NULL")
Select("DISTINCT \"User\".id, \"User\".username").
Where("\"User\".username IS NOT NULL")
type Result struct {
ID string `gorm:"column:id"`