mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Fixed an ImportError when redis-py is not installed
This commit is contained in:
@@ -6,7 +6,6 @@ from django.utils.timezone import now
|
||||
from pretix import settings
|
||||
|
||||
from pretix.base.models import Quota
|
||||
from redis import RedisError
|
||||
|
||||
logger = logging.getLogger('pretix.base.locking')
|
||||
|
||||
@@ -100,6 +99,7 @@ def lock_quota_redis(quota):
|
||||
|
||||
|
||||
def release_quota_redis(quota):
|
||||
from redis import RedisError
|
||||
lock = redis_lock_from_quota(quota)
|
||||
try:
|
||||
lock.release()
|
||||
|
||||
Reference in New Issue
Block a user