Commit 950bc169 authored by Ryan Herbert's avatar Ryan Herbert

use pipe as separator for set tokens

parent 4e30c2c7
Pipeline #19949 failed with stages
in 42 seconds
......@@ -58,7 +58,7 @@ Tokeniser.prototype.readTokens = function() {
return $(this).data('set-id');
})
.get()
.join();
.join('|');
}
Tokeniser.prototype.createToken = function(set_id) {
......
......@@ -21,7 +21,7 @@ def extract_set_type(target):
'r': 'run',
's': 'generic'
}
return mapping[target.split(':')[1][0]]
return mapping[target.split('|')[1][0]]
def manage_filename(filename):
......
......@@ -29,4 +29,6 @@ class Generic(SampleSet):
error = []
if data["name"] == "":
error.append("name needed")
if data["name"].find("|"):
error.append("illegal character '|' in name")
return error
......@@ -59,4 +59,6 @@ class Patient(SampleSet):
datetime.datetime.strptime(""+data['birth'], '%Y-%m-%d')
except ValueError:
error.append("date (wrong format)")
if (data["first_name"] + data['last_name']).find('|'):
error.append("illegal character '|' in name")
return error
......@@ -54,4 +54,7 @@ class Run(SampleSet):
datetime.datetime.strptime(""+data['run_date'], '%Y-%m-%d')
except ValueError:
error.append("date (wrong format)")
if data["name"].find("|"):
error.append("illegal character '|' in name")
return error
Markdown is supported
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