From 873de4d919613806221ef27c7f7ab8178bde4d81 Mon Sep 17 00:00:00 2001 From: "J.-S. Caux" <J.S.Caux@uva.nl> Date: Tue, 11 Jul 2017 10:08:25 +0200 Subject: [PATCH] Debug metadata --- journals/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/journals/views.py b/journals/views.py index 378f0bbb0..5eac224f0 100644 --- a/journals/views.py +++ b/journals/views.py @@ -593,7 +593,7 @@ def metadata_xml_deposit(request, doi_label, option='test'): '<doi_batch_id>'))[2].partition('</doi_batch_id>')[0] path = (settings.MEDIA_ROOT + publication.in_issue.path + '/' + publication.get_paper_nr() + '/' + publication.doi_label.replace('.', '_') - + '_' + timestamp + '.xml') + + '_Crossref_' + timestamp + '.xml') if os.path.isfile(path): errormessage = 'The metadata file for this metadata timestamp already exists' return render(request, 'scipost/error.html', context={'errormessage': errormessage}) @@ -634,9 +634,9 @@ def metadata_xml_deposit(request, doi_label, option='test'): # Save a copy to the filename without timestamp path1 = (settings.MEDIA_ROOT + publication.in_issue.path + '/' + publication.get_paper_nr() + '/' + publication.doi_label.replace('.', '_') - + '.xml') + + '_Crossref.xml') f = open(path1, 'w') - f.write(xml) + f.write(publication.metadata_xml) f.close() context = { -- GitLab