From 9bcd4e028b5c90b9d7c4cf948fb18b7555324240 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 19 May 2022 17:40:50 +1000 Subject: [PATCH] Fixes for ninja users --- app/Traits/GenerateMigrationResources.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Traits/GenerateMigrationResources.php b/app/Traits/GenerateMigrationResources.php index 4bc3e6a761..4742bfe91a 100644 --- a/app/Traits/GenerateMigrationResources.php +++ b/app/Traits/GenerateMigrationResources.php @@ -451,6 +451,12 @@ trait GenerateMigrationResources $agts = AccountGatewayToken::where('client_id', $ninja_client->id)->get(); $is_default = true; + if(count($agts) == 0) { + $transformed[] = [ + 'client' => $ninja_client + ]; + } + foreach($agts as $agt) { $payment_method = $agt->default_payment_method;