qa: Permit empty content if all is Ok
This commit is contained in:
parent
940b32debc
commit
5aa21d2679
@ -67,7 +67,11 @@ func createExerciceQA(u QAUser, exercice fic.Exercice, body []byte) (interface{}
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(uq.Subject) == 0 {
|
if len(uq.Subject) == 0 {
|
||||||
return nil, errors.New("Subject not filled")
|
if uq.State == "ok" {
|
||||||
|
uq.Subject = "RAS"
|
||||||
|
} else {
|
||||||
|
return nil, errors.New("Subject not filled")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if qa, err := exercice.NewQAQuery(uq.Subject, u.TeamId, u.User, uq.State); err != nil {
|
if qa, err := exercice.NewQAQuery(uq.Subject, u.TeamId, u.User, uq.State); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user