gtaylor/django-dynamodb-sessions — pull request #6 by bjinwright (2013-02-13 20:45:37+00:00)
Title: Fix for the TypeError: Unsupported type "" for value "None" erros

When I installed the session backend I noticed that whenever I went to the login page I would get a 500 error. Upon further review I noticed the save method was calling the boto save method while the session_key was a None value.

Here is a brief overview of what I changed.

If the save method is called with must_create equal to True, I'm setting self._session_key equal to None and when self.get_or_create_session_key is called the new session_key will be created. If must_create is not True well it will just get the current session_key. I left the put_attribute call for data pretty much the same.