I'd rather prefer to see `view.id if single_checkbox else None`, for stylistic reasons, but this also works.