Update models.py

this change will avoid the error 'expected a character buffer object'
Merge pull request #2 from vader666/patch-1

Update models.py