> In hasjob/views/listing.py:
>
> >                  msg.body = email_text
> >                  msg.html = email_html
> >                  mail.send(msg)
> > +                job_application.replied_by_id = g.user.id
>
> Doesn't g.user mean the currently logged in user?

If there is no logged in user, which is a valid scenario for older
listings, `g.user` will be `None`. Therefore `g.user.id` will fail.