mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 15:45:59 +01:00
2017-06-28 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'web/rdxport/carts.cpp' and 'web/rdxport/import.cpp' that caused the 'EditCart' web API call to return an error when attempting to set the Title field to its current value when Allow Duplicate Cart Titles was not enabled.
This commit is contained in:
@@ -2011,12 +2011,13 @@ QString RDCart::uniqueCartTitle(unsigned cartnum)
|
||||
}
|
||||
|
||||
|
||||
bool RDCart::titleIsUnique(const QString &str)
|
||||
bool RDCart::titleIsUnique(unsigned except_cartnum,const QString &str)
|
||||
{
|
||||
bool ret=false;
|
||||
|
||||
QString sql=QString("select NUMBER from CART where ")+
|
||||
"TITLE=\""+RDEscapeString(str)+"\"";
|
||||
"(TITLE=\""+RDEscapeString(str)+"\")&&"+
|
||||
QString().sprintf("NUMBER!=%u",except_cartnum);
|
||||
RDSqlQuery *q=new RDSqlQuery(sql);
|
||||
ret=!q->first();
|
||||
delete q;
|
||||
|
||||
Reference in New Issue
Block a user