This commit is contained in:
James Cole
2017-09-12 22:28:14 +02:00
parent 3e8fe70915
commit 1d3ace5f21
5 changed files with 82 additions and 49 deletions

View File

@@ -420,7 +420,7 @@ class CategoryController extends Controller
$accountRepository = app(AccountRepositoryInterface::class);
$accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]);
$first = $repository->firstUseDate($category);
if ($first->year === 1900) {
if (is_null($first)) {
$first = new Carbon;
}
$range = Preferences::get('viewRange', '1M')->data;

View File

@@ -67,7 +67,7 @@ class CategoryController extends Controller
$start = $repository->firstUseDate($category);
if ($start->year === 1900) {
if (is_null($first)) {
$start = new Carbon;
}