diff options
Diffstat (limited to 'ogcp')
-rw-r--r-- | ogcp/views.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ogcp/views.py b/ogcp/views.py index 83a0e4d..c2a6a17 100644 --- a/ogcp/views.py +++ b/ogcp/views.py @@ -2378,8 +2378,11 @@ def action_center_update(): payload = {"id": int(center)} r = server.get('/center/info', payload) + if not r: + return ogserver_down('scopes') if r.status_code != requests.codes.ok: return ogserver_error('scopes') + form.comment.data = r.json()['comment'] form.name.data = r.json()['name'] @@ -2412,8 +2415,11 @@ def action_center_info(): payload = {"id": int(center)} r = server.get('/center/info', payload) + if not r: + return ogserver_down('scopes') if r.status_code != requests.codes.ok: return ogserver_error('scopes') + form.comment.data = r.json()['comment'] form.comment.render_kw = {'readonly': True} form.name.data = r.json()['name'] |