Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def create_for_data(self, data):
"""Cover whole DOI generation and submition
for given data object
@param data: object to submit
@type doi: repository.models.data.Data
"""
doi = get_doi(data)
location = data.get_absolute_slugurl()
doi_post(doi,location)
doi.save()
metadata_post(metadata_xml_string(data))
return doi