Skip to content

Commit

Permalink
Quick fix for #91
Browse files Browse the repository at this point in the history
XHR code in config_bridges.html expected JSON.
A bit inconsistent to only return JSON in this handler.
  • Loading branch information
Zetro committed May 14, 2014
1 parent f9638f8 commit 5949e51
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,11 @@ def post(self):
if not response['valid_username']:
BridgeConfigHandler.bridges[mac]['lights'] = -1
#self.write({'state': 'success'})
self.redirect('bridges')
#self.redirect('bridges')
else:
print(response['errorcode'], response['errormessage'])
self.redirect("bridges?status=error&msg=%s" % response['errormessage'].capitalize())
#self.redirect("bridges?status=error&msg=%s" % response['errormessage'].capitalize())
self.write(response)

elif 'search' in data:
print('Search')
Expand Down

0 comments on commit 5949e51

Please sign in to comment.