Fix AttributeError

If self.connection is missing, an AttributeError is raised.
Got this error while using rest_framework, but still not found how
HStoreDict is missing of 'connection' attribute