Fix find random row in tests
Allow media_file.media_entry_id to be null