bug fixed
This commit is contained in:
parent
f828b707a9
commit
ee98a22899
|
@ -203,7 +203,7 @@ impl Composition {
|
|||
Ok(query_ordery_by)
|
||||
}
|
||||
|
||||
fn get_find_all(&self, find_all: &models::FindAll) -> Result<String, Error> {
|
||||
fn get_where(&self, find_all: &models::FindAll) -> Result<String, Error> {
|
||||
let mut query_where = String::new();
|
||||
|
||||
if let Some(s) = &find_all.search {
|
||||
|
@ -519,7 +519,7 @@ impl Composition {
|
|||
write!(&mut query, "{}", BETTING_HISTORY_COUNT_QUERY)
|
||||
.map_err(|e| diesel::result::Error::QueryBuilderError(e.to_string().into()))?;
|
||||
|
||||
let query_where = self.get_find_all(find_all)?;
|
||||
let query_where = self.get_where(find_all)?;
|
||||
if !query_where.is_empty() {
|
||||
write!(&mut query, " WHERE {}", query_where)
|
||||
.map_err(|e| diesel::result::Error::QueryBuilderError(e.to_string().into()))?;
|
||||
|
@ -546,7 +546,7 @@ impl Composition {
|
|||
write!(&mut query, "{}", BETTING_HISTORY_QUERY)
|
||||
.map_err(|e| diesel::result::Error::QueryBuilderError(e.to_string().into()))?;
|
||||
|
||||
let query_where = self.get_find_all(find_all)?;
|
||||
let query_where = self.get_where(find_all)?;
|
||||
if !query_where.is_empty() {
|
||||
write!(&mut query, " WHERE {}", query_where)
|
||||
.map_err(|e| diesel::result::Error::QueryBuilderError(e.to_string().into()))?;
|
||||
|
|
Loading…
Reference in New Issue
Block a user