Skip to content

Commit

Permalink
tiny bug fix, doublon names during germplasm csv permitted
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximilian committed Nov 30, 2023
1 parent 52e7b43 commit 16228e1
Showing 1 changed file with 1 addition and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -995,15 +995,14 @@ export default class GermplasmTable extends Vue {
}
/**
* Called when we upload a csv. Verifies that each germplasm has a unique name and uri.
* Called when we upload a csv. Verifies that each germplasm has a unique uri.
* Initialises this.newColumns to all from the csv that were not already present in this.tableColumns.
*/
uploaded(data) {
if (data.length > 1000) {
alert(this.$t("GermplasmTable.alertFileSize"));
} else {
this.newColumns = [];
var uniqueNames = [];
var uniqueURIs = [];
let insertionOK = true;
Expand All @@ -1020,25 +1019,6 @@ export default class GermplasmTable extends Vue {
);
insertionOK = false;
break;
} else {
if(!Oeso.checkURIs(this.$attrs.germplasmType, Oeso.ACCESSION_TYPE_URI)){
if (
currentName !== "" &&
uniqueNames.indexOf(currentName) === -1
) {
uniqueNames.push(currentName);
} else {
insertionOK = false;
alert(
this.$t("GermplasmTable.alertDuplicateName") +
" " +
rowIndex +
", name= " +
currentName
);
break;
}
}
}
if (currentUri !== "") {
if (uniqueURIs.indexOf(currentUri) === -1) {
Expand Down Expand Up @@ -1289,7 +1269,6 @@ fr:
seeErrorLines: See lines
seeAll : see all
infoMandatoryFields: Il est obligatoire de renseigner au moins une des 3 colonnes URI de l'espèce, URI de la varieté ou URI de l'Accession.
alertDuplicateName: Le fichier comporte un doublon de nom à la ligne
alertDuplicateURI: Le fichier comporte un doublon d'uri à la ligne
alertFileSize: Le fichier contient trop de ligne, 1000 lignes maximum
missingName: Le nom n'est pas renseigné à la ligne
Expand Down

0 comments on commit 16228e1

Please sign in to comment.