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

G2P-418 and G2P-432 #98

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

olaaustine
Copy link
Collaborator

No description provided.

@olaaustine olaaustine marked this pull request as ready for review February 13, 2025 14:06
@olaaustine olaaustine requested a review from dglemos February 14, 2025 16:16
Copy link
Collaborator

@dglemos dglemos left a comment

Choose a reason for hiding this comment

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

I tried to insert a panel we already have but the endpoint failed with IntegrityError.
Input data:

{
    "name": "Prenatal",
    "description": "Prenatal",
    "is_visible": 1
}

The endpoint first updated is_visible from 0 to 1 and the description to the one I inserted in the input data, then it returned a failure:

IntegrityError at /gene2phenotype/api/create/panel/
(1062, "Duplicate entry 'Prenatal' for key 'panel.name'")

The endpoint tried to insert the panel again.

If the panel is already in the database the endpoint should return the message "Can not create an existing panel". We don't want to update an existing panel when creating a new one - this could lead to us updating a panel by mistake.

@olaaustine olaaustine requested a review from dglemos February 17, 2025 11:18
@olaaustine olaaustine requested a review from dglemos February 17, 2025 11:39
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