Links to broken uploads in topics lead to 500 errors with 2.5.0

I think the best bet here is for you to hard nuke all the bad Upload rows from your database.

If you have no upload, don’t keep it there.