Do not panic if there is no Redsys payment set up yet
This commit is contained in:
parent
47a2b8e480
commit
5c4ce32143
|
@ -35,8 +35,10 @@ 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 {
|
||||||
|
if !database.ErrorIsNotFound(err) {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
f.MustRender(w, r, user, company)
|
f.MustRender(w, r, user, company)
|
||||||
case http.MethodPut:
|
case http.MethodPut:
|
||||||
updatePaymentSettings(w, r, user, company, conn)
|
updatePaymentSettings(w, r, user, company, conn)
|
||||||
|
|
Loading…
Reference in New Issue