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

GetPost diesel code producing wrong SQL #2792

Closed
makotech222 opened this issue Mar 29, 2023 · 1 comment
Closed

GetPost diesel code producing wrong SQL #2792

makotech222 opened this issue Mar 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@makotech222
Copy link
Collaborator

From Matrix:

the query actually returns a large number of rows (in my case), where it should only be one i believe
image

this is the WHERE clause of the query:
notice that the last OR is alongside the 'post.id =' clause, so its getting the correct post, but also all posts by person.id = 9175 (from joins)

looks like it stems from this rust code:
image

As a temp fix, i've removed that rust code and it works fine now

@makotech222 makotech222 added the bug Something isn't working label Mar 29, 2023
@dessalines
Copy link
Member

Thanks. I didn't like merging this one, and figured it could cause some problems. It needs a SQL solution, but I don't know the cleanest way to do it. Lets have this a duplicate of #2624 , which I've re-opened.

@dessalines dessalines closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants