Unbreak AJAX views using @get_path_obj

Many of our AJAX requests do not have a ‘path’, but @get_path_obj now
requires one always (since a81fa7b8f477eb9ab4b2bd8b9cacfdcc8630b566)
which breaks any views that use it, so relax this and use the ‘path’
only when present.