Do not panic if there is no Redsys payment set up yet
This commit is contained in:
parent
47a2b8e480
commit
5c4ce32143
|
@ -35,7 +35,9 @@ func (h *AdminHandler) Handler(user *auth.User, company *auth.Company, conn *dat
|
||||||
case http.MethodGet:
|
case http.MethodGet:
|
||||||
f := newPaymentForm(user.Locale)
|
f := newPaymentForm(user.Locale)
|
||||||
if err := f.FillFromDatabase(r.Context(), company, conn); err != nil {
|
if err := f.FillFromDatabase(r.Context(), company, conn); err != nil {
|
||||||
panic(err)
|
if !database.ErrorIsNotFound(err) {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
f.MustRender(w, r, user, company)
|
f.MustRender(w, r, user, company)
|
||||||
case http.MethodPut:
|
case http.MethodPut:
|
||||||
|
|
Loading…
Reference in New Issue