Commit 11858c6b authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Merge branch 'v1-misc-fixes' into 'v1.0.0'

Various small v1 bugfixes

See merge request !537
parents 214b1efb 857c6ee6
Pipeline #120269 passed with stages
in 27 minutes and 30 seconds
......@@ -241,22 +241,22 @@ class Api {
async get(path, query, config) {
const GET = (path, body, config) => this.axios.get(path, config)
return this.doHttpRequest(GET, path, null, {params: query, ...config})
return this.doHttpRequest(GET, path, null, {params: query, methodName: 'GET', ...config})
}
async post(path, body, config) {
const POST = (path, body, config) => this.axios.post(path, body, config)
return this.doHttpRequest(POST, path, body, config)
return this.doHttpRequest(POST, path, body, {methodName: 'POST', ...config})
}
async put(path, body, config) {
const PUT = (path, body, config) => this.axios.put(path, body, config)
return this.doHttpRequest(PUT, path, body, config)
return this.doHttpRequest(PUT, path, body, {methodName: 'PUT', ...config})
}
async delete(path, config) {
const DELETE = (path, body, config) => this.axios.delete(path, config)
return this.doHttpRequest(DELETE, path, null, config)
return this.doHttpRequest(DELETE, path, null, {methodName: 'DELETE', ...config})
}
async doHttpRequest(method, path, body, config) {
......@@ -278,7 +278,7 @@ class Api {
}
if (config.returnRequest) {
return {
method: method.name,
method: config.methodName || method.name,
url: `${this.baseURL}${path}`,
body: body,
response: results.data
......
......@@ -150,6 +150,10 @@ export const rootSections = sortDefs(defs.filter(def => (
* @param {object} data Archive.
*/
export function resolveRef(ref, data) {
if (!ref) {
return null
}
const resolve = (ref, context) => {
const parts = ref.split('#')
if (parts.length === 2 && parts[0] !== '') {
......
......@@ -932,9 +932,11 @@ class Entry(Proc):
if parser is None:
# Should only be possible if the upload is published and we have
logger.warn('no parser matches during process, not updating the entry')
logger.warn('no parser matches during process')
self.warnings = ['no matching parser found during processing']
else:
parser = parser_dict[self.parser_name]
if parser is not None:
should_parse = True
parser_changed = self.parser_name != parser.name and parser_dict[self.parser_name].name != parser.name
if parser_changed:
......@@ -943,6 +945,10 @@ class Entry(Proc):
'different parser matches during process, use new parser',
parser=parser.name)
self.parser_name = parser.name # Parser renamed
else:
should_parse = False
logger.error('could not determine a perser for this entry')
self.errors = ['could not determine a parser for this entry']
if should_parse:
self.set_last_status_message('Initializing metadata')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment