mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Show specific error on invoice generation in admin #2802
This commit is contained in:
parent
0f652aedc1
commit
9f42784d33
6 changed files with 6 additions and 5 deletions
|
@ -12,7 +12,7 @@ class Admin::InvoicesController < AdminController
|
|||
@deposit = Deposit.new(deposit_params.merge(registrar: r))
|
||||
@invoice = @deposit.issue_prepayment_invoice
|
||||
|
||||
if @invoice.persisted?
|
||||
if @invoice && @invoice.persisted?
|
||||
flash[:notice] = t(:record_created)
|
||||
redirect_to [:admin, @invoice]
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue