Xavier-Lam / django-cache-lock

A simple lock extension for django's cache.
MIT License
14 stars 9 forks source link

fix defect: AttributeError: type object 'ConnectionProxy' has no attribute '_alias' #5

Closed alexzhangs closed 3 years ago

alexzhangs commented 3 years ago

Django==3.2 django-cache-lock=0.2.3

File "/Users/alex/.pyenv/versions/ssm3/lib/python3.7/site-packages/django_lock.py", line 344, in lock cls = get_lock_cls(client) File "/Users/alex/.pyenv/versions/ssm3/lib/python3.7/site-packages/django_lock.py", line 300, in get_lock_cls backend_cls = _backend_cls(client) File "/Users/alex/.pyenv/versions/ssm3/lib/python3.7/site-packages/django_lock.py", line 53, in _backend_cls elif ConnectionProxy and backend_cls._alias == DEFAULT_CACHE_ALIAS: AttributeError: type object 'ConnectionProxy' has no attribute '_alias'

alexzhangs commented 3 years ago

Please be aware that the PyPI version is not bumped up in the fix.

alexzhangs commented 3 years ago

Thanks for the speedy response! Would you release the change to PyPI?

Xavier-Lam commented 3 years ago

I will release this change to PyPI in a week.