update
This commit is contained in:
parent
55bdce51ff
commit
d9be9bbf00
@ -41,10 +41,13 @@ func (r *AnswerRepository) CreateAnswers(ctx context.Context, answers []model.An
|
||||
}
|
||||
|
||||
for _, ans := range answers {
|
||||
utmJSON, err := json.Marshal(ans.Utm)
|
||||
var utmJSON []byte
|
||||
if ans.Utm != nil {
|
||||
utmJSON, err = json.Marshal(ans.Utm)
|
||||
if err != nil {
|
||||
return nil, []error{err}
|
||||
}
|
||||
}
|
||||
|
||||
params := sqlcgen.InsertAnswersParams{
|
||||
Content: sql.NullString{String: ans.Content, Valid: true},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user