From 5cfe6464aa416a50d8a79bdaef6e24188ca521e6 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:09:58 +0200 Subject: [PATCH] fix(database): conditionally set started_at only if the database is running --- app/Livewire/Project/Database/Heading.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Project/Database/Heading.php b/app/Livewire/Project/Database/Heading.php index a9783d911..d1da60469 100644 --- a/app/Livewire/Project/Database/Heading.php +++ b/app/Livewire/Project/Database/Heading.php @@ -33,7 +33,10 @@ class Heading extends Component public function activityFinished() { try { - $this->database->started_at ??= now(); + // Only set started_at if database is actually running + if ($this->database->isRunning()) { + $this->database->started_at ??= now(); + } $this->database->save(); if (is_null($this->database->config_hash) || $this->database->isConfigurationChanged()) {