fix: Convert empty MinIO config strings to None to fix tests

This commit is contained in:
Andrea Bugeja 2025-12-09 15:25:19 +01:00
parent 7e83591654
commit 9108499905

View file

@ -28,8 +28,10 @@ from common import settings
class RAGFlowMinio:
def __init__(self):
self.conn = None
self.bucket = settings.MINIO.get('bucket', None)
self.prefix_path = settings.MINIO.get('prefix_path', None)
# Use `or None` to convert empty strings to None, ensuring single-bucket
# mode is truly disabled when not configured
self.bucket = settings.MINIO.get('bucket', None) or None
self.prefix_path = settings.MINIO.get('prefix_path', None) or None
self.__open__()
@staticmethod