-
Notifications
You must be signed in to change notification settings - Fork 0
Test: Nominee endpoint #127
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
base: main
Are you sure you want to change the base?
Conversation
* refactored how the election officers are looked up * changed the Nominee put back to a patch * made election tests work with the new testing setup
| query = query.where(BlogPosts.title == title) | ||
|
|
||
| # should return the one entry with an unique title | ||
| post = await db_session.scalar(query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit pick: might wanna check if post is none
| query = query.where(BlogPosts.post_tags in tags).where(BlogPosts.last_edited).order_by(BlogPosts.last_edited.desc()) | ||
| # .all() should return a list of all the posts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slight syntax issue for sqlalchemy. BlogPosts.post_tags in tags is invalid syntax
Correction: query = query.where(BlogPosts.post_tags.contains(tags)).order_by(BlogPosts.last_edited.desc())
| detail="candidate is already registered for that position", | ||
| ) | ||
|
|
||
| registration.update_from_params(body) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want to await this
depends on #126