- Fixed bug whereby if no columns labels were specified, it was
  considered a column count mismatch.
- Fixed unit tests to use m/d/Y not M/D/Y dateformat.
This commit is contained in:
Paul Beckingham
2009-03-29 21:27:48 -04:00
parent 2700713c03
commit 8ab3c1cc3c
2 changed files with 8 additions and 6 deletions

View File

@@ -2044,13 +2044,14 @@ std::string handleCustomReport (
std::vector <std::string> labels;
split (labels, labelList, ',');
if (columns.size () != labels.size ())
if (columns.size () != labels.size () && labels.size () != 0)
throw std::string ("There are a different number of columns than labels ") +
"for report '" + report + "'. Please correct this.";
std::map <std::string, std::string> columnLabels;
for (unsigned int i = 0; i < columns.size (); ++i)
columnLabels[columns[i]] = labels[i];
if (labels.size ())
for (unsigned int i = 0; i < columns.size (); ++i)
columnLabels[columns[i]] = labels[i];
std::string sortList = conf.get ("report." + report + ".sort");
std::vector <std::string> sortOrder;