mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 12:11:19 +00:00
Lots of new code to test the import routine.
Signed-off-by: James Cole <thegrumpydictator@gmail.com>
This commit is contained in:
@@ -81,7 +81,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
*/
|
||||
public function findByName(string $name) : Bill
|
||||
{
|
||||
$bills = $this->user->bills()->get();
|
||||
$bills = $this->user->bills()->get(['bills.*']);
|
||||
|
||||
/** @var Bill $bill */
|
||||
foreach ($bills as $bill) {
|
||||
|
@@ -94,7 +94,7 @@ class BudgetRepository implements BudgetRepositoryInterface
|
||||
*/
|
||||
public function findByName(string $name): Budget
|
||||
{
|
||||
$budgets = $this->user->budgets()->get();
|
||||
$budgets = $this->user->budgets()->get(['budgets.*']);
|
||||
/** @var Budget $budget */
|
||||
foreach ($budgets as $budget) {
|
||||
if ($budget->name === $name) {
|
||||
|
@@ -110,7 +110,7 @@ class CategoryRepository implements CategoryRepositoryInterface
|
||||
*/
|
||||
public function findByName(string $name) : Category
|
||||
{
|
||||
$categories = $this->user->categories()->get();
|
||||
$categories = $this->user->categories()->get(['categories.*']);
|
||||
foreach ($categories as $category) {
|
||||
if ($category->name === $name) {
|
||||
return $category;
|
||||
|
@@ -99,7 +99,7 @@ class ExportJobRepository implements ExportJobRepositoryInterface
|
||||
*/
|
||||
public function findByKey(string $key): ExportJob
|
||||
{
|
||||
$result = $this->user->exportJobs()->where('key', $key)->first();
|
||||
$result = $this->user->exportJobs()->where('key', $key)->first(['export_jobs.*']);
|
||||
if (is_null($result)) {
|
||||
return new ExportJob;
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface
|
||||
*/
|
||||
public function findByKey(string $key): ImportJob
|
||||
{
|
||||
$result = $this->user->importJobs()->where('key', $key)->first();
|
||||
$result = $this->user->importJobs()->where('key', $key)->first(['import_jobs.*']);
|
||||
if (is_null($result)) {
|
||||
return new ImportJob;
|
||||
}
|
||||
|
Reference in New Issue
Block a user