Small optimalizations.

This commit is contained in:
James Cole
2015-01-25 08:28:59 +01:00
parent a24c90eae8
commit 9327430484
8 changed files with 118 additions and 28 deletions

View File

@@ -42,7 +42,7 @@ class BudgetController extends BaseController
$date = Session::get('start', Carbon::now()->startOfMonth());
$limitRepetition = $this->_repository->updateLimitAmount($budget, $date, $amount);
return Response::json(['name' => $budget->name, 'repetition' => $limitRepetition->id]);
return Response::json(['name' => $budget->name, 'repetition' => $limitRepetition ? $limitRepetition->id : 0]);
}