fix gitlab tests
This commit is contained in:
@@ -17,11 +17,11 @@ class ReimbursementDonationService
|
||||
}
|
||||
|
||||
$expense = Expense::query()->find($expenseId);
|
||||
if (! $expense) {
|
||||
if (!$expense) {
|
||||
throw new RuntimeException('Expense not found.');
|
||||
}
|
||||
|
||||
if (! empty($expense->reimbursement_id)) {
|
||||
if (!empty($expense->reimbursement_id)) {
|
||||
throw new RuntimeException('Expense is already tied to a reimbursement.');
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class ReimbursementDonationService
|
||||
DB::commit();
|
||||
} catch (\Throwable $e) {
|
||||
DB::rollBack();
|
||||
Log::error('Failed to mark donation: '.$e->getMessage(), ['expense_id' => $expenseId]);
|
||||
Log::error('Failed to mark donation: ' . $e->getMessage(), ['expense_id' => $expenseId]);
|
||||
throw new RuntimeException('Unable to mark donation right now.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user