[Setup] Fix the mongo name to create instances using new driver (#2594)

* oops

* damn you
This commit is contained in:
Will 2019-04-22 18:33:52 -04:00 committed by GitHub
parent 874204bf18
commit 95d5ec5f0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,10 +161,11 @@ def basic_setup():
storage = get_storage_type() storage = get_storage_type()
storage_dict = {1: "JSON", 2: "MongoDB"} storage_dict = {1: BackendType.JSON, 2: BackendType.MONGO}
default_dirs["STORAGE_TYPE"] = storage_dict.get(storage, 1) storage_type: BackendType = storage_dict.get(storage, BackendType.JSON)
default_dirs["STORAGE_TYPE"] = storage_type.value
if storage_dict.get(storage, 1) == "MongoDB": if storage_type == BackendType.MONGO:
from redbot.core.drivers.red_mongo import get_config_details from redbot.core.drivers.red_mongo import get_config_details
default_dirs["STORAGE_DETAILS"] = get_config_details() default_dirs["STORAGE_DETAILS"] = get_config_details()