Verified Commit 13b8e287 authored by Mathias B.'s avatar Mathias B.
Browse files

Correction du cherry-pick foireux qui a introduit plus de modifications que nécessaires

parent 0b2e209d
use crate::repositories::PostgreSQLResult;
use crate::row_lines;
use crate::utils::database::DatabaseClient;
use datastructs::bot::Config;
use eyre::WrapErr;
......@@ -35,12 +34,6 @@ impl ConfigRepository {
}
};
let language: String = row.get("language");
let language = language.parse()
.map_err(|_| warn!("La langue {} pour la guilde ID {} n'est pas reconnue. Défaut à l'anglais", language, guild_id))
.ok()
.unwrap_or(Language::En);
let mut config = Config {
guilds_id: row.get("guilds_id"),
collect_stats: row.get("collect_stats"),
......@@ -57,7 +50,6 @@ impl ConfigRepository {
ticket_category: row.get("ticket_category"),
ticket_message_id: row.get("ticket_message_id"),
ticket_channel_id: row.get("ticket_channel_id"),
language,
};
config.fix_configuration_values();
......
......@@ -15,7 +15,6 @@ pub struct Config {
pub ticket_category: Option<i64>,
pub ticket_message_id: Option<i64>,
pub ticket_channel_id: Option<i64>,
pub language: Language
}
impl Config {
......@@ -46,7 +45,6 @@ impl Default for Config {
ticket_category: None,
ticket_message_id: None,
ticket_channel_id: None,
language: Language::En
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment