qa: Permit empty content if all is Ok
This commit is contained in:
parent
940b32debc
commit
5aa21d2679
@ -67,8 +67,12 @@ func createExerciceQA(u QAUser, exercice fic.Exercice, body []byte) (interface{}
|
||||
}
|
||||
|
||||
if len(uq.Subject) == 0 {
|
||||
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 {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user