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:
Fred Gleason 2019-09-03 13:18:13 -04:00
parent 70cf00b268
commit c31c267e8d
2 changed files with 9 additions and 1 deletions

View File

@ -19086,3 +19086,6 @@
containing an invalid UTF-8 character.
2019-09-02 Patrick Linstruth <patrick@deltecent.com>
* Refactored 'pypad_tunein.py' ProcessPad while loop.
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.

View File

@ -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;
}