[1.6.x] Fixed LogEntry.get_admin_url() for non-existent models.

Regression introduced by [369b6fa]; refs #18169.

Backport of 1b47508ac8 from master