Update models.py

fixed bug that prevented connecting to sensu-api with basic auth.