fixed reading transactions and category deletion

This commit is contained in:
Finn 2018-01-16 14:47:17 +00:00
parent f79ec09782
commit 5ad83795bd
3 changed files with 3 additions and 1 deletions

View file

@ -36,7 +36,7 @@
</div>
<div class="form-group">
<label for="text">Category</label>
<input id="category" type="text" class="form-control" placeholder="No Category" name="category" value="<%= $transaction->category->category->name %>" disabled>
<input id="category" type="text" class="form-control" placeholder="Uncategorised" name="category" value="<%= defined $transaction->category ? $transaction->category->category->name : 'Uncategorised' %>" disabled>
</div>
<div class="form-group">
<label for="submitted_at">Submitted At</label>