mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-07 07:48:12 +08:00
check for default database on mongo connection
correction
This commit is contained in:
@@ -27,7 +27,7 @@ class Mongo(Broker):
|
|||||||
def get_collection(self):
|
def get_collection(self):
|
||||||
if not Conf.MONGO_DB:
|
if not Conf.MONGO_DB:
|
||||||
try:
|
try:
|
||||||
Conf.MONGO_DB = self.connection.get_default_database()[1]
|
Conf.MONGO_DB = self.connection.get_default_database().name
|
||||||
except ConfigurationError:
|
except ConfigurationError:
|
||||||
Conf.MONGO_DB = 'django-q'
|
Conf.MONGO_DB = 'django-q'
|
||||||
return self.connection[Conf.MONGO_DB][self.list_key]
|
return self.connection[Conf.MONGO_DB][self.list_key]
|
||||||
|
|||||||
Reference in New Issue
Block a user