Skip to content

incorrect merge with retrieved BaseOrg document #1681

@ElectricNroff

Description

@ElectricNroff

updatedRegistryOrg = _.mergeWith(registryOrg, registryObjectRaw, skipNulls)

The required behavior is that optional fields (i.e., ones not marked as required by files such as BaseOrg.json in the src/middleware/schemas directory) remain optional even if they were previously found in a stored document, such as the stored document retrieved here:
const registryOrg = await this.findOneByShortName(shortName, options)

For example, there are realistic cases where an organization first identifies with a specific country, but then insists that it is no longer associated with a country because it wants to present itself (both within the CVE Program and elsewhere) as a "global company." There should not be a merge that ends up with the obsolete cna_country value solely because no other merge source has a property assignment for cna_country.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Past

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions