Fix search for latest sync data

We were pulling the oldest sync data
This commit is contained in:
Eli Ribble 2025-11-13 14:57:14 +00:00
parent 6fb5d48791
commit e6a90631ff
No known key found for this signature in database

View file

@ -132,7 +132,7 @@ func htmlDashboard(ctx context.Context, w http.ResponseWriter, user *models.User
return return
} }
var lastSync *time.Time var lastSync *time.Time
sync, err := org.FieldseekerSyncs(sm.OrderBy("created")).One(ctx, PGInstance.BobDB) sync, err := org.FieldseekerSyncs(sm.OrderBy("created").Desc()).One(ctx, PGInstance.BobDB)
if err != nil { if err != nil {
if err.Error() != "sql: no rows in result set" { if err.Error() != "sql: no rows in result set" {
respondError(w, "Failed to get syncs", err, http.StatusInternalServerError) respondError(w, "Failed to get syncs", err, http.StatusInternalServerError)