Browse Source

fix: Remove unnecessary decode statement

Since we create our Redis instance with , we don't
need to worry about decoding this value here. Plus this doesn't work
in python3 anyway
Jason Kidd 3 tháng trước cách đây
mục cha
commit
c5b67ea430
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      backend/open_webui/socket/utils.py

+ 1 - 1
backend/open_webui/socket/utils.py

@@ -26,7 +26,7 @@ class RedisLock:
 
     def release_lock(self):
         lock_value = self.redis.get(self.lock_name)
-        if lock_value and lock_value.decode("utf-8") == self.lock_id:
+        if lock_value and lock_value == self.lock_id:
             self.redis.delete(self.lock_name)