fix: fix internal server error in POST /members

This commit is contained in:
Sam 2023-04-08 01:25:27 +02:00
parent 62b9c1dbd6
commit 893244dc16
Signed by: sam
GPG key ID: B4EF20DDE721CAA1

View file

@ -131,7 +131,7 @@ func (s *Server) createMember(w http.ResponseWriter, r *http.Request) (err error
}
// set names, pronouns, fields
err = s.DB.SetMemberNamesPronouns(ctx, tx, m.ID, cmr.Names, cmr.Pronouns)
err = s.DB.SetMemberNamesPronouns(ctx, tx, m.ID, db.NotNull(cmr.Names), db.NotNull(cmr.Pronouns))
if err != nil {
log.Errorf("setting names and pronouns for member %v: %v", m.ID, err)
return err