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

Fixing duped report view for admins. Fixes #1933 #1945

Merged
merged 2 commits into from
Nov 23, 2021
Merged

Conversation

dessalines
Copy link
Member

No description provided.

.eq(post::community_id)
.and(community_moderator::person_id.eq(self.my_person_id)),
),
)
Copy link
Member

Choose a reason for hiding this comment

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

You are repeating this code 4 times, maybe you can extract it into a function.

Copy link
Member Author

@dessalines dessalines Nov 23, 2021

Choose a reason for hiding this comment

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

Can't unfortunately, the function input query is different for each of these, and it would be 2 pages of BoxedSelectStatement<....tons of table joins>

Copy link
Member

Choose a reason for hiding this comment

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

Damn, i wish they could allow some kind of generics for diesel operations, would save us so much code.

Btw i just noticed that unit tests are failing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, that pry has to do with my sort order change, I'll fix that in a sec.

@Nutomic Nutomic merged commit 46c7429 into main Nov 23, 2021
dessalines added a commit that referenced this pull request Dec 8, 2021
* Fixing duped report view for admins. Fixes #1933

* Fixing tests.
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.

None yet

2 participants