From d4e5a1bdf253bbcc5fce48f7e32306d16b4bfe72 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 23 Oct 2025 17:03:16 +1300 Subject: [PATCH] Update src/Appwrite/Platform/Workers/Migrations.php Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/Appwrite/Platform/Workers/Migrations.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 2ac8bd5a1f..c8ca2a92ac 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -535,6 +535,11 @@ class Migrations extends Action $user = $this->dbForPlatform->findOne('users', [ Query::equal('$sequence', [$userInternalId]) ]); + + if (!$user || $user->isEmpty()) { + Console::warning("User not found for CSV export notification: $userInternalId"); + return; + } // Set up locale $locale = new Locale(System::getEnv('_APP_LOCALE', 'en'));