mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-30 09:13:51 +01:00
2019-09-03 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in 'RDCart::setYear()' that caused invalid SQL to be generated when given a null year.
This commit is contained in:
@@ -253,7 +253,12 @@ int RDCart::year() const
|
||||
|
||||
void RDCart::setYear(int year)
|
||||
{
|
||||
SetRow("YEAR",QString().sprintf("%04d-01-01",year));
|
||||
if((year>0)&&(year<10000)) {
|
||||
SetRow("YEAR",QString().sprintf("%04d-01-01",year));
|
||||
}
|
||||
else {
|
||||
SetRow("YEAR");
|
||||
}
|
||||
metadata_changed=true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user