Skip to content

fix(collections): fix 400 on cedar metadata re-submit#1023

Open
Vlad0n20 wants to merge 1 commit into
CenterForOpenScience:feature/es2-consolidationfrom
Vlad0n20:fix/ENG-11519
Open

fix(collections): fix 400 on cedar metadata re-submit#1023
Vlad0n20 wants to merge 1 commit into
CenterForOpenScience:feature/es2-consolidationfrom
Vlad0n20:fix/ENG-11519

Conversation

@Vlad0n20

Copy link
Copy Markdown
Contributor
  • Ticket: [ENG-11519]
  • Feature flag: n/a

Purpose

Summary of Changes

Screenshot(s)

Side Effects

QA Notes


handleAddToCollectionConfirm(): void {
const payload = this.config.data.payload;
const project = this.config.data.project;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a model here, similar to the one below.

? this.actions.createCedarRecord(cedarData, project.id as string, ResourceType.Project)
const saveCedar$: Observable<unknown> = cedarData
? existingCedarRecord
? this.actions.updateCedarRecord(cedarData, existingCedarRecord.id!, project.id as string, ResourceType.Project)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
? this.actions.updateCedarRecord(cedarData, existingCedarRecord.id!, project.id as string, ResourceType.Project)
? this.actions.updateCedarRecord(cedarData, existingCedarRecord.id!, project.id, ResourceType.Project)

Remove as string after adding model for project.

const saveCedar$: Observable<unknown> = cedarData
? existingCedarRecord
? this.actions.updateCedarRecord(cedarData, existingCedarRecord.id!, project.id as string, ResourceType.Project)
: this.actions.createCedarRecord(cedarData, project.id as string, ResourceType.Project)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove as string after adding model for project.

Suggested change
: this.actions.createCedarRecord(cedarData, project.id as string, ResourceType.Project)
: this.actions.createCedarRecord(cedarData, project.id, ResourceType.Project)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also remove in other places where you have it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants