From a2539ebf3a44c28c93e1c06d06acd6b28eaa1c77 Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 31 Dec 2025 14:58:41 -0800 Subject: [PATCH] Fix finished time showing for in-progress deployments --- internal/models/deployment.go | 8 ++++---- templates/app_detail.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/models/deployment.go b/internal/models/deployment.go index e0af1ec..a650e33 100644 --- a/internal/models/deployment.go +++ b/internal/models/deployment.go @@ -134,23 +134,23 @@ func (d *Deployment) ShortCommit() string { } // FinishedAtISO returns the finished time in ISO format for JavaScript parsing. -// Falls back to started time if not finished yet. +// Returns empty string if not finished yet. func (d *Deployment) FinishedAtISO() string { if d.FinishedAt.Valid { return d.FinishedAt.Time.Format(time.RFC3339) } - return d.StartedAt.Format(time.RFC3339) + return "" } // FinishedAtFormatted returns the finished time formatted for display. -// Falls back to started time if not finished yet. +// Returns empty string if not finished yet. func (d *Deployment) FinishedAtFormatted() string { if d.FinishedAt.Valid { return d.FinishedAt.Time.Format("2006-01-02 15:04:05") } - return d.StartedAt.Format("2006-01-02 15:04:05") + return "" } func (d *Deployment) insert(ctx context.Context) error { diff --git a/templates/app_detail.html b/templates/app_detail.html index 2b397ec..caefa22 100644 --- a/templates/app_detail.html +++ b/templates/app_detail.html @@ -305,7 +305,7 @@