mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-29 07:02:34 +02:00
2021-09-13 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in 'RDCartFilter' that caused a SQL error to be thrown during initialization. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
7bd18d2ea5
commit
b6f343df9b
@ -22421,3 +22421,6 @@
|
||||
* Fixed a regression in rdlibrary(1) that could cause less than
|
||||
100 carts to be displayed when the 'Show Only First 100 Matches'
|
||||
box was ticked.
|
||||
2021-09-13 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in 'RDCartFilter' that caused a SQL error to be
|
||||
thrown during initialization.
|
||||
|
@ -222,17 +222,15 @@ QString RDCartFilter::filterSql(const QStringList &and_fields) const
|
||||
// Group Filter
|
||||
//
|
||||
QStringList groups;
|
||||
for(int i=0;i<d_group_box->count();i++) {
|
||||
if(d_group_box->itemText(i)!=tr("ALL")) {
|
||||
groups.push_back(d_group_box->itemText(i));
|
||||
}
|
||||
for(int i=1;i<d_group_box->count();i++) {
|
||||
groups.push_back(d_group_box->itemText(i));
|
||||
}
|
||||
if(groups.size()==0) { // No groups selected, so force an empty selection
|
||||
return QString(" where `CART`.`NUMBER`<0"); // An impossibility
|
||||
}
|
||||
sql+=RDCartFilter::groupFilter(d_group_box->currentText(),groups);
|
||||
if(d_show_track_carts) {
|
||||
sql=sql.left(sql.length()-2); // Remove the final "&&"
|
||||
sql=sql.left(sql.length()-3); // Remove the final "&& "
|
||||
}
|
||||
else {
|
||||
sql+="`CART`.`OWNER` is null ";
|
||||
|
Loading…
x
Reference in New Issue
Block a user