Skip to content

Commit

Permalink
update(database): Check for default_connection
Browse files Browse the repository at this point in the history
  • Loading branch information
skuzzis committed Nov 21, 2024
1 parent fc100b1 commit 79ad1de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/core/scripting/network/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ PluginDatabase::PluginDatabase(std::string m_connection_name)
this->connection_name = m_connection_name;
this->db = g_dbManager->GetDatabase(this->connection_name);

if(!this->db) {
if(!this->db && this->connection_name != "default_connection") {
PRINTF("Database connection \"%s\" doesn't exists inside the database configurations. Automatically falling back to \"default_connection\".\n", m_connection_name.c_str());
this->db = g_dbManager->GetDatabase("default_connection");
}
Expand Down

0 comments on commit 79ad1de

Please sign in to comment.