src/pds_doi_service/core/actions/update.py
def _complete_dois(self, dois):
        """
        Ensures the list of DOI objects to reserve have the requisite fields,
        such as status or contributor, filled in prior to submission.

        Parameters
        ----------
        dois : list of Doi
            The list of DOI objects to complete

        Returns
        -------
        dois : list of Doi
            The completed list of DOI objects.

        """
        for doi in dois:
            if self._node:
                doi.node_id = self._node
                doi.contributor = NodeUtil.get_node_long_name(self._node)

            doi.publisher = self._config.get("OTHER", "doi_publisher")

            # Store the previous status of this DOI
            doi.previous_status = doi.status

            # Make sure the global keywords from the config are included
            doi.keywords.update(get_global_keywords())

            # If this DOI has already been released (aka is findable or in review),
            # then move the status back to the Review step. Otherwise, the record
            # should still be in draft.
            if doi.previous_status in (DoiStatus.Findable, DoiStatus.Review):
                doi.status = DoiStatus.Review
            else:
                doi.status = DoiStatus.Draft

        return dois

        Ensures the list of DOI objects to reserve have the requisite fields,
        such as status or contributor, filled in prior to submission.

        Parameters
        ----------
        dois : list of Doi
            The list of DOI objects to complete

        Returns
        -------
        dois : list of Doi
            The completed list of DOI objects.

        
Ensures the list of DOI objects to reserve have the requisite fields,
such as status or contributor, filled in prior to submission.

Parameters

dois : list of Doi
The list of DOI objects to complete

Returns

dois : list of Doi
The completed list of DOI objects.
Ensures the list of DOI objects to reserve have the requisite fields such as status or contributor filled in prior to submission . Parameters dois : list of Doi The list of DOI objects to complete Returns dois : list of Doi The completed list of DOI objects .
def _complete_dois(self, dois):
        for doi in dois:
            if self._node:
                doi.node_id = self._node
                doi.contributor = NodeUtil.get_node_long_name(self._node)
            doi.publisher = self._config.get("OTHER", "doi_publisher")
            doi.previous_status = doi.status
            doi.keywords.update(get_global_keywords())
            if doi.previous_status in (DoiStatus.Findable, DoiStatus.Review):
                doi.status = DoiStatus.Review
            else:
                doi.status = DoiStatus.Draft
        return dois
def _complete_dois ( self , dois ) : for doi in dois : if self . _node : doi . node_id = self . _node doi . contributor = NodeUtil . get_node_long_name ( self . _node ) doi . publisher = self . _config . get ( "OTHER" , "doi_publisher" ) doi . previous_status = doi . status doi . keywords . update ( get_global_keywords ( ) ) if doi . previous_status in ( DoiStatus . Findable , DoiStatus . Review ) : doi . status = DoiStatus . Review else : doi . status = DoiStatus . Draft return dois
Ensures the list of DOI objects to reserve have the requisite fields,
such as status or contributor, filled in prior to submission.
Ensures the list of DOI objects to reserve have the requisite fields such as status or contributor filled in prior to submission .
"""
        Ensures the list of DOI objects to reserve have the requisite fields,
        such as status or contributor, filled in prior to submission.

        Parameters
        ----------
        dois : list of Doi
            The list of DOI objects to complete

        Returns
        -------
        dois : list of Doi
            The completed list of DOI objects.

        """ # Store the previous status of this DOI # Make sure the global keywords from the config are included # If this DOI has already been released (aka is findable or in review), # then move the status back to the Review step. Otherwise, the record # should still be in draft.
self
dois