fix SQL error caused by code cleanup 8f3e9787adcfa22cb3ed2f7e791a9a67d3746f94
Merge pull request #3086 from openscholar/3083

fix SQL error caused by code cleanup