Skip to content

Commit

Permalink
Merge pull request invoiceninja#7394 from turbo124/master
Browse files Browse the repository at this point in the history
Minor Fixes
  • Loading branch information
turbo124 authored Apr 26, 2022
2 parents 9ceda7d + f9e44df commit 8b85500
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 85 deletions.
2 changes: 1 addition & 1 deletion app/Services/Migration/AuthService.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function start()

$message_body = json_decode($response->getBody(), true);

info(print_r($message_body,1));
//info(print_r($message_body,1));

$this->isSuccessful = true;
$this->token = $message_body['data'][0]['token']['token'];
Expand Down
8 changes: 4 additions & 4 deletions app/Traits/GenerateMigrationResources.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,12 +531,12 @@ public function getUsers()
'first_name' => $user->first_name ?: '',
'last_name' => $user->last_name ?: '',
'phone' => $user->phone ?: '',
'email' => $user->username,
'email' => str_contains($user->username, "@") ? $user->username : $user->email,
'confirmation_code' => $user->confirmation_code,
'failed_logins' => $user->failed_logins,
'referral_code' => $user->referral_code,
'oauth_user_id' => $user->oauth_user_id,
'oauth_provider_id' => $user->oauth_provider_id,
// 'oauth_user_id' => $user->oauth_user_id,
// 'oauth_provider_id' => $user->oauth_provider_id,
'google_2fa_secret' => '',
'accepted_terms_version' => $user->accepted_terms_version,
'password' => $user->password,
Expand Down Expand Up @@ -1015,7 +1015,7 @@ private function transformRecurringStatusId($invoice)
if($invoice->is_public == 0)
return 1;

if($invoice->end_date < now())
if($invoice->end_date && $invoice->end_date < now())
return 4;

return 1;
Expand Down
Loading

0 comments on commit 8b85500

Please sign in to comment.