Mercurial > gemma
changeset 328:003243ec5ce5
Don't crash if we doing update as unprivileged user without a bounding box.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 03 Aug 2018 10:27:34 +0200 |
parents | 363983d5c567 |
children | 71970f03c9e8 |
files | controllers/user.go |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/controllers/user.go Thu Aug 02 19:25:30 2018 +0200 +++ b/controllers/user.go Fri Aug 03 10:27:34 2018 +0200 @@ -116,6 +116,10 @@ ) } } else { + if newUser.Extent == nil { + err = JSONError{http.StatusBadRequest, "extent is mandatory"} + return + } res, err = db.Exec( updateUserUnprivSQL, user,