Skip to content

Commit

Permalink
Use $.attribute_id if there's no source provided
Browse files Browse the repository at this point in the history
This was a regression from V1: previously, you could emit source, and we'd look for the attribute ID in the source data.
We now do the same, by prepending `$.` onto the attribute id.
  • Loading branch information
paprikati committed Mar 25, 2024
1 parent 8f7a247 commit d0cb845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion output/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func MarshalEntries(ctx context.Context, output *Output, entries []source.Entry,
)
for _, attr := range output.Attributes {
// Use the attribute ID by default if source isn't explicitly provided.
source := attr.ID
source := "$." + attr.ID
if attr.Source.Valid {
source = attr.Source.String
}
Expand Down

0 comments on commit d0cb845

Please sign in to comment.