From f8ee1e5e9707ccd4089dd68be58a0877cab017f1 Mon Sep 17 00:00:00 2001
From: Frank Sauerburger <frank@sauerburger.com>
Date: Thu, 7 Oct 2021 09:25:46 +0200
Subject: [PATCH] Fix redis exception import

---
 uhepp_org/uhepp_vault/utils.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/uhepp_org/uhepp_vault/utils.py b/uhepp_org/uhepp_vault/utils.py
index bdb8ca6..26cd378 100644
--- a/uhepp_org/uhepp_vault/utils.py
+++ b/uhepp_org/uhepp_vault/utils.py
@@ -1,7 +1,7 @@
 
 from django.conf import settings
 from django.contrib.auth.models import User, Group
-from redis import Redis
+import redis
 
 def enqueue_preview_job(uuid):
     """Enter a preview image creation job into the redis queue"""
@@ -11,8 +11,8 @@ def enqueue_preview_job(uuid):
     queue = settings.REDIS_PREVIEW_QUEUE
 
     try:
-        redis = Redis(host=host, username=username, password=password)
-        redis.lpush(queue, str(uuid))
+        redcon = redis.Redis(host=host, username=username, password=password)
+        redcon.lpush(queue, str(uuid))
     except redis.exceptions.ResponseError as e:
         print(e)
         pass
-- 
GitLab