This commit is contained in:
James Cole
2021-02-03 06:31:14 +01:00
parent e441df367d
commit 84ad8529df
2 changed files with 7 additions and 3 deletions

View File

@@ -86,6 +86,12 @@ class EditController extends Controller
*/
public function edit(Request $request, Recurrence $recurrence)
{
// TODO should be in repos
$count = $recurrence->recurrenceTransactions()->count();
if(0 === $count) {
throw new FireflyException('This recurring transaction has no meta-data. You will have to delete it and recreate it. Sorry!');
}
/** @var RecurrenceTransformer $transformer */
$transformer = app(RecurrenceTransformer::class);
$transformer->setParameters(new ParameterBag);