Check from ExtraFields in getSortTableClauseForIds

if no extrafields are on the many_many relationship error generated same fix as chillu on getSortTable
Merge pull request #61 from adam-stead/master

Check from ExtraFields in getSortTableClauseForIds