get_object() requires a database query and the object is used in twice (in log_action() and history_delete()). So this change just saves a database query.