Skip to content

Conversation

@zhouxinfei
Copy link

Description

Fixed the kwargs check in RedisDB.__init__() from if kwargs is None: to if not kwargs:.

Problem

The original code incorrectly checks if kwargs is None:, but kwargs is always a dictionary (even if empty) in Python, never None. This causes the fallback to setting.REDISDB_KWARGS to never trigger when RedisDB() is called without arguments.

Solution

Changed the condition to if not kwargs: which correctly checks for an empty dictionary.

Changes Made

  1. feapder/db/redisdb.py:
    • Line XX: Changed if kwargs is None: to if not kwargs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant