Skip to content

Commit

Permalink
Make it zero as well, because who needs it
Browse files Browse the repository at this point in the history
  • Loading branch information
adzialocha committed Nov 15, 2023
1 parent b15f65c commit e1fce66
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aquadoggo/src/db/stores/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -920,15 +920,15 @@ fn order_sql(
// Order by document view id, except of if it was selected manually. We need this to assemble
// the rows to documents correctly at the end
let id_sql = {
// Skip this step when only one field was selected for this query to not mess with the
// order as soon as there are duplicate ordered fields
if fields.len() == 1 {
None
} else {
if fields.len() > 1 {
match order.field {
Some(Field::Meta(MetaField::DocumentViewId)) => None,
_ => Some("documents.document_view_id ASC".to_string()),
}
} else {
// Skip this step when none or only one field was selected for this query to not mess
// with the order as soon as there are duplicate ordered fields
None
}
};

Expand Down

0 comments on commit e1fce66

Please sign in to comment.