mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-19 14:43:30 +02:00
2022-12-13 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'RDLog::create()' that threw a SQL error when attempting to create a log with a name that already existed. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
e0890f05bd
commit
a851df85de
@ -23788,3 +23788,6 @@
|
|||||||
2022-12-13 Fred Gleason <fredg@paravelsystems.com>
|
2022-12-13 Fred Gleason <fredg@paravelsystems.com>
|
||||||
* Fixed a regression in 'RDLibraryModel' that could throw a SQL
|
* Fixed a regression in 'RDLibraryModel' that could throw a SQL
|
||||||
error when processing notifications for added carts.
|
error when processing notifications for added carts.
|
||||||
|
2022-12-13 Fred Gleason <fredg@paravelsystems.com>
|
||||||
|
* Fixed a bug in 'RDLog::create()' that threw a SQL error when
|
||||||
|
attempting to create a log with a name that already existed.
|
||||||
|
@ -534,6 +534,11 @@ bool RDLog::create(const QString &name,const QString &svc_name,
|
|||||||
RDSvc::ShelflifeOrigin shelforigin;
|
RDSvc::ShelflifeOrigin shelforigin;
|
||||||
QString desc_tmpl;
|
QString desc_tmpl;
|
||||||
|
|
||||||
|
if(RDLog::exists(name)) {
|
||||||
|
*err_msg=QObject::tr("Log already exists!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
sql=QString("select ")+
|
sql=QString("select ")+
|
||||||
"`DEFAULT_LOG_SHELFLIFE`,"+ // 00
|
"`DEFAULT_LOG_SHELFLIFE`,"+ // 00
|
||||||
"`LOG_SHELFLIFE_ORIGIN`,"+ // 01
|
"`LOG_SHELFLIFE_ORIGIN`,"+ // 01
|
||||||
@ -578,7 +583,7 @@ bool RDLog::create(const QString &name,const QString &svc_name,
|
|||||||
}
|
}
|
||||||
q=new RDSqlQuery(sql);
|
q=new RDSqlQuery(sql);
|
||||||
if(!q->isActive()) {
|
if(!q->isActive()) {
|
||||||
*err_msg=QObject::tr("Log already exists!");
|
*err_msg=QObject::tr("Insertion into LOGS table failed!");
|
||||||
delete q;
|
delete q;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user