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:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user