Removed casting to bool just before negation.
Fixed #21084 -- Used proxy model's content type for admin log entries.
Fixed #21084 -- Used proxy model's content type for admin log entries.

(the previous commit included only the test)
Added missing request parameter to get_current_site().