Skip to content

Commit

Permalink
Merged in DSC-1180 (pull request DSpace#753)
Browse files Browse the repository at this point in the history
[DSC-1180] Fixed license not granted error displayed twice

Approved-by: Giuseppe Digilio
  • Loading branch information
alisaismailati authored and atarix83 committed Oct 12, 2023
2 parents 076f783 + 824356b commit 9b84e0e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SubmissionState } from '../../submission.reducers';
import { SetDuplicateDecisionAction } from '../../objects/submission-objects.actions';
import { submissionSectionDataFromIdSelector } from '../../selectors';
import { WorkspaceitemSectionDetectDuplicateObject } from '../../../core/submission/models/workspaceitem-section-deduplication.model';
import { isEmpty, isNotEmpty } from '../../../shared/empty.util';
import { hasValue, isEmpty, isNotEmpty } from '../../../shared/empty.util';
import { Observable } from 'rxjs';

/**
Expand Down Expand Up @@ -62,19 +62,21 @@ export class DetectDuplicateService {
map((item: WorkspaceitemSectionDetectDuplicateObject) => {
const outputObject: WorkspaceitemSectionDetectDuplicateObject = {} as WorkspaceitemSectionDetectDuplicateObject;
outputObject.matches = {};
Object.keys(item.matches)
.filter((key) => {
let output = false;
if (isWorkFlow) {
output = isEmpty(item.matches[key].workflowDecision);
} else {
output = isEmpty(item.matches[key].submitterDecision);
}
return output;
})
.forEach((key) => {
outputObject.matches[key] = item.matches[key];
});
if (hasValue(item)) {
Object.keys(item.matches)
.filter((key) => {
let output = false;
if (isWorkFlow) {
output = isEmpty(item.matches[key].workflowDecision);
} else {
output = isEmpty(item.matches[key].submitterDecision);
}
return output;
})
.forEach((key) => {
outputObject.matches[key] = item.matches[key];
});
}
return outputObject;
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const SECTION_LICENSE_FORM_MODEL = [
required: null
},
errorMessages: {
required: 'submission.sections.license.required',
notgranted: 'submission.sections.license.notgranted'
},
type: 'CHECKBOX',
Expand Down

0 comments on commit 9b84e0e

Please sign in to comment.