Skip to content

reviewObject.approver is associated with unapproved data #1771

@ElectricNroff

Description

@ElectricNroff

const dataToUpdate = (body && Object.keys(body).length)
? _.merge({}, org.toObject(), body)
: reviewObject.new_review_data
const requestingUserUUID = await userRepo.getUserUUID(req.ctx.user, req.ctx.org, { session })
const reviewObj = await reviewRepo.approveReviewOrgObject(UUID, req.ctx.user, { session })

In the _.merge({}, org.toObject(), body) case, reviewObject.approver is, in effect, bound to the action of approving review data associated with the UUID passed to approveReviewOrgObject. However, the approver did not approve that data (or, in any way, agree that that data was legitimate); instead, they approved the body data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Normal Priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions