Replace Django 1.6 specific .first() with .all()[0]