Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

Check assign-to user for existence beforehand

Cette révision appartient à :
sfan5 2017-05-13 17:36:50 +02:00
Parent 72ab7a490c
révision b24e31a7dc
1 fichiers modifiés avec 5 ajouts et 0 suppressions

Voir le fichier

@ -64,11 +64,16 @@ func (f *ReassignForm) ExtractInfo(r *http.Request) error {
return err
}
f.AssignTo = uint(parsed)
_, _, _, _, err = userService.RetrieveUser(r, tmp)
if err != nil {
return fmt.Errorf("User to assign to doesn't exist")
}
return nil
}
func (f *ReassignForm) ExecuteAction() (int, error) {
var toBeChanged []uint
var err error
if f.By == "olduser" {