diff options
| author | JP Appel <jeanpierre.appel01@gmail.com> | 2025-06-12 02:32:48 -0400 |
|---|---|---|
| committer | JP Appel <jeanpierre.appel01@gmail.com> | 2025-06-12 02:32:48 -0400 |
| commit | 61d89ee58e6a4d990e6e81c951731c80c2cd1ece (patch) | |
| tree | 9c205528083ec7a22f9a508a23cd0a1dca9c9be7 /pkg/data | |
| parent | eec51c3c4c5cde3135a8219cff8e6e0e54918918 (diff) | |
Minor bug fix
Diffstat (limited to 'pkg/data')
| -rw-r--r-- | pkg/data/put.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/data/put.go b/pkg/data/put.go index ac0dabc..a5237ae 100644 --- a/pkg/data/put.go +++ b/pkg/data/put.go @@ -131,11 +131,9 @@ func (p *PutMany) documents(ctx context.Context) error { // future inserts for _, doc := range p.pathDocs { title := sql.NullString{String: doc.Title, Valid: doc.Title != ""} - dateUnix := doc.Date.Unix() - date := sql.NullInt64{Int64: dateUnix, Valid: dateUnix != 0} + date := sql.NullInt64{Int64: doc.Date.Unix(), Valid: !doc.Date.IsZero()} - filetimeUnix := doc.FileTime.Unix() - filetime := sql.NullInt64{Int64: filetimeUnix, Valid: filetimeUnix != 0} + filetime := sql.NullInt64{Int64: doc.FileTime.Unix(), Valid: !doc.FileTime.IsZero()} meta := sql.NullString{String: doc.OtherMeta, Valid: doc.OtherMeta != ""} |
