I think instead of adding this extra condition you can just make course_prefix (#L179) to be:
```course_prefix = u'{0.org}/{0.course}/'.format(course_location) ``` a slash at the end of course to match the condition.