mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-15 03:30:17 +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).
|
WithContext(ctx).
|
||||||
Joins("User").
|
Joins("User").
|
||||||
Model(&model.AuditLog{}).
|
Model(&model.AuditLog{}).
|
||||||
Select("DISTINCT User.id, User.username").
|
Select("DISTINCT \"User\".id, \"User\".username").
|
||||||
Where("User.username IS NOT NULL")
|
Where("\"User\".username IS NOT NULL")
|
||||||
|
|
||||||
type Result struct {
|
type Result struct {
|
||||||
ID string `gorm:"column:id"`
|
ID string `gorm:"column:id"`
|
||||||
|
|||||||
Reference in New Issue
Block a user