learning-unlimited/ESP-Website — comment on commit 2295173fe9e1d569667ee24c7440b72a989387de
File: esp/esp/program/models/class_.py line 970
By jmoldow:

It looks like you're right about count() : https://docs.djangoproject.com/en/1.3/ref/models/querysets/#methods-that-do-not-return-querysets

What if we add this to the top of the function instead:
```python
try:
meeting_times[0]
except Exception:
return False
```

As for ordered, we can make sure that we never call .order_by('id') in any of the functions that call cannotSchedule() (or any of the functions that call those functions, etc.)