Do not panic if there is no Redsys payment set up yet

This commit is contained in:
jordi fita mas 2023-12-21 17:51:39 +01:00
parent 47a2b8e480
commit 5c4ce32143
1 changed files with 3 additions and 1 deletions

View File

@ -35,8 +35,10 @@ func (h *AdminHandler) Handler(user *auth.User, company *auth.Company, conn *dat
case http.MethodGet:
f := newPaymentForm(user.Locale)
if err := f.FillFromDatabase(r.Context(), company, conn); err != nil {
if !database.ErrorIsNotFound(err) {
panic(err)
}
}
f.MustRender(w, r, user, company)
case http.MethodPut:
updatePaymentSettings(w, r, user, company, conn)