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

/new with invalid references value causes unexpected error #540

Open
eartharoid opened this issue Apr 26, 2024 · 0 comments
Open

/new with invalid references value causes unexpected error #540

eartharoid opened this issue Apr 26, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@eartharoid
Copy link
Member

because this line doesn't check if the referenced ticket exists

if (referencesTicketId) data.referencesTicket = { connect: { id: referencesTicketId } };

which happens earlier but is out of scope

const ticket = await this.client.prisma.ticket.findUnique({ where: { id: referencesTicketId } });
if (ticket) {

@eartharoid eartharoid added bug Something isn't working good first issue Good for newcomers labels Apr 26, 2024
@eartharoid eartharoid added this to the v4.1 milestone Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
Status: Todo
Development

No branches or pull requests

1 participant