Skip to content

Commit

Permalink
Return clean document from Decode
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSisley committed Aug 24, 2023
1 parent 5240086 commit 58fbfdb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions db/fetcher/encoded_doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ func Decode(encdoc EncodedDocument) (*client.Document, error) {

doc.SchemaVersionID = encdoc.SchemaVersionID()

// client.Document tracks which fields have been set ('dirtied'), here we
// are simply decoding a clean document and the dirty flag is an artifact
// of the current client.Document interface.
doc.Clean()

return doc, nil
}

Expand Down

0 comments on commit 58fbfdb

Please sign in to comment.