Juniper Upgrade - LMS not rendering certain content due to handling of StudentModule.DoesNotExist exception

Unfortunately I don’t know how to debug this further without connecting to the server. You should try to place break points (import pdb; pdb.set_trace()) in /openedx/venv/lib/python3.5/site-packages/django/db/backends/mysql/base.py (line 71) to understand what query is failing when running ./manage.py migrate core 0013.