SciPost Code Repository
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SciPost
Manage
Activity
Members
Labels
Plan
Issues
118
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SciPost
SciPost
Commits
23fe534f
Commit
23fe534f
authored
7 years ago
by
Jorran de Wit
Browse files
Options
Downloads
Patches
Plain Diff
Path error in deposit
parent
9126eacd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
journals/views.py
+4
-4
4 additions, 4 deletions
journals/views.py
with
4 additions
and
4 deletions
journals/views.py
+
4
−
4
View file @
23fe534f
...
@@ -489,7 +489,7 @@ def metadata_xml_deposit(request, doi_label, option='test'):
...
@@ -489,7 +489,7 @@ def metadata_xml_deposit(request, doi_label, option='test'):
'
<doi_batch_id>
'
)[
2
].
partition
(
'
</doi_batch_id>
'
)[
0
]
'
<doi_batch_id>
'
)[
2
].
partition
(
'
</doi_batch_id>
'
)[
0
]
# Find Crossref xml files
# Find Crossref xml files
path
=
settings
.
MEDIA_ROOT
path
=
''
if
publication
.
in_issue
:
if
publication
.
in_issue
:
path
+=
'
{issue_path}/{paper_nr}/{doi_label}_Crossref
'
.
format
(
path
+=
'
{issue_path}/{paper_nr}/{doi_label}_Crossref
'
.
format
(
issue_path
=
publication
.
in_issue
.
path
,
issue_path
=
publication
.
in_issue
.
path
,
...
@@ -508,7 +508,7 @@ def metadata_xml_deposit(request, doi_label, option='test'):
...
@@ -508,7 +508,7 @@ def metadata_xml_deposit(request, doi_label, option='test'):
valid
=
True
valid
=
True
response_headers
=
None
response_headers
=
None
response_text
=
None
response_text
=
None
if
os
.
path
.
isfile
(
path
):
if
os
.
path
.
isfile
(
settings
.
MEDIA_ROOT
+
path
):
# Deposit already done before.
# Deposit already done before.
valid
=
False
valid
=
False
else
:
else
:
...
@@ -611,7 +611,7 @@ def metadata_DOAJ_deposit(request, doi_label):
...
@@ -611,7 +611,7 @@ def metadata_DOAJ_deposit(request, doi_label):
timestamp
=
publication
.
metadata_xml
.
partition
(
'
<timestamp>
'
)[
2
].
partition
(
'
</timestamp>
'
)[
0
]
timestamp
=
publication
.
metadata_xml
.
partition
(
'
<timestamp>
'
)[
2
].
partition
(
'
</timestamp>
'
)[
0
]
# Find DOAJ xml files
# Find DOAJ xml files
path
=
settings
.
MEDIA_ROOT
path
=
''
if
publication
.
in_issue
:
if
publication
.
in_issue
:
path
+=
'
{issue_path}/{paper_nr}/{doi_label}_DOAJ
'
.
format
(
path
+=
'
{issue_path}/{paper_nr}/{doi_label}_DOAJ
'
.
format
(
issue_path
=
publication
.
in_issue
.
path
,
issue_path
=
publication
.
in_issue
.
path
,
...
@@ -626,7 +626,7 @@ def metadata_DOAJ_deposit(request, doi_label):
...
@@ -626,7 +626,7 @@ def metadata_DOAJ_deposit(request, doi_label):
path_wo_timestamp
=
path
+
'
.json
'
path_wo_timestamp
=
path
+
'
.json
'
path
+=
'
_{timestamp}.json
'
.
format
(
timestamp
=
timestamp
)
path
+=
'
_{timestamp}.json
'
.
format
(
timestamp
=
timestamp
)
if
os
.
path
.
isfile
(
path
):
if
os
.
path
.
isfile
(
settings
.
MEDIA_ROOT
+
path
):
errormessage
=
'
The metadata file for this metadata timestamp already exists
'
errormessage
=
'
The metadata file for this metadata timestamp already exists
'
return
render
(
request
,
'
scipost/error.html
'
,
context
=
{
'
errormessage
'
:
errormessage
})
return
render
(
request
,
'
scipost/error.html
'
,
context
=
{
'
errormessage
'
:
errormessage
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment