Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def datacite_post(request, slug):
"""
View posts new data to datacite and requests for a DOI
"""
data = Data.get_object(slug)
if request.user == data.user:
DOI.objects.create_for_data(data)
return HttpResponseRedirect(reverse('data_view_slug', args=[slug,]))