Skip to content
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

Merged
merged 2 commits into from
Mar 25, 2024
Merged

Showing curator info on edit page #72

merged 2 commits into from
Mar 25, 2024

Conversation

jim-sheldon
Copy link
Contributor

No description provided.

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) {
Copy link
Collaborator

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.

Comment on lines -75 to +89
...{ curators: { createdBy: curator._id } },
...{ curators: { createdBy: curatorMetadata.curator } },
Copy link
Collaborator

@stanislaw-zakrzewski stanislaw-zakrzewski Mar 25, 2024

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.

@jim-sheldon jim-sheldon marked this pull request as ready for review March 25, 2024 13:57
@jim-sheldon jim-sheldon merged commit 5a5834f into main Mar 25, 2024
2 checks passed
@jim-sheldon jim-sheldon deleted the curation-info branch March 25, 2024 14:24
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