fix: metadata query (#3084)

This commit is contained in:
Livio Amstutz 2022-01-21 11:30:43 +01:00 committed by GitHub
parent 3ee3b8f6d3
commit 5af7d8315d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,7 +102,7 @@ func (q *Queries) SearchUserMetadata(ctx context.Context, userID string, queries
if err != nil {
return nil, err
}
metadata.LatestSequence, err = q.latestSequence(ctx, userTable)
metadata.LatestSequence, err = q.latestSequence(ctx, userMetadataTable)
return metadata, err
}
@ -173,7 +173,6 @@ func prepareUserMetadataListQuery() (sq.SelectBuilder, func(*sql.Rows) (*UserMet
UserMetadataValueCol.identifier(),
countColumn.identifier()).
From(userMetadataTable.identifier()).
LeftJoin(join(HumanUserIDCol, UserIDCol)).
PlaceholderFormat(sq.Dollar),
func(rows *sql.Rows) (*UserMetadataList, error) {
metadata := make([]*UserMetadata, 0)