-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Showing curator info on edit page #72
Conversation
0e822d4
to
b61be1b
Compare
b61be1b
to
52f1a51
Compare
Changes: * Remove dependency between curator and age range in case model * Update minimal case and full case to work with curator model chagnes
@@ -88,40 +98,43 @@ const dtoFromCase = async (storedCase: CaseDocument) => { | |||
}); | |||
} | |||
|
|||
if (ageRange && creator) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the main culprit causing issues with tests. this if SHOULD only contain age range and NOT the creator. Latter was added because of eslint which required check for a variable that based on the api requirements MUST be present, but due to the other issue in the tests was not. Decoupling this if into two separate ones resolves the issue.
...{ curators: { createdBy: curator._id } }, | ||
...{ curators: { createdBy: curatorMetadata.curator } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it (and also one in the full case) from:
...{ curators: curatorMetadata.curator },
to:
...{ curators: { createdBy: curatorMetadata.curator } },
this triggered the hidden if coupling described above.
No description provided.