Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/breeding-insight/service/StudyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class StudyService {

let response: Result<Error, BiResponse>;
if (trial !== undefined && trial.externalReferences !== undefined) {
// TODO: Change to trialDbId when fixing bi-brapi study endpoint [BI-2962]
let externalReferenceId = BrAPIUtils.getBreedingInsightId(trial.externalReferences, '/trials');
// Throw if trial is missing ExternalReferenceId.
if (externalReferenceId === undefined) throw new Error("Trial is missing external reference.");
Expand Down
4 changes: 2 additions & 2 deletions src/views/import/Dataset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,13 @@ export default class Dataset extends ProgramsBase {

if(!this.isSubEntity){
datasetTableRow.expUnitId = this.removeUnique(unit.observationUnitName);
datasetTableRow.obsUnitId = BrAPIUtils.getBreedingInsightId(unit.externalReferences, "/observationunits");
datasetTableRow.obsUnitId = unit.observationUnitDbId;
} else {
let parentObsInfo = unit.observationUnitPosition.observationLevelRelationships.find((val) => val.levelOrder === 0);
if (parentObsInfo) datasetTableRow.obsUnitId = this.removeUnique(parentObsInfo.levelCode);
datasetTableRow.expUnitId = unit.additionalInfo.expUnitID;
datasetTableRow.subExpUnitId = this.removeUnique(unit.observationUnitName);
datasetTableRow.subObsUnitId = BrAPIUtils.getBreedingInsightId(unit.externalReferences, "/observationunits");
datasetTableRow.subObsUnitId = unit.observationUnitDbId;
}

// Env Year
Expand Down
Loading