'Publishes item if the category is DIRECT_ONLY. This assumes another method has checked that
location points to the head of the branch and ignores the version. If you call this in any
other context, you may blow away another user\'s changes.
NOTE: only publishes the item at location: no children get published.'

def _auto_publish_no_children(self, location, category, user_id, **kwargs):

    if ((location.branch == ModuleStoreEnum.BranchName.draft) and (category in DIRECT_ONLY_CATEGORIES)):
        self.publish(location.version_agnostic(), user_id, blacklist=EXCLUDE_ALL, **kwargs)
