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

Issue 144 #227

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

Issue 144 #227

wants to merge 2 commits into from

Conversation

TueeNguyen
Copy link
Collaborator

Description

Fixes #144

Type of Change:

  • Code

Code/Quality Assurance Only

  • New feature (non-breaking change which adds functionality pre-approved by mentors)

How Has This Been Tested?

  • Tested using the a localhost api

image

image

image

Checklist:

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials
  • I have commented my code or provided relevant documentation, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged

Code/Quality Assurance Only

  • My changes generate no new warnings
  • My PR currently breaks something (fix or feature that would cause existing functionality to not work as expected)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been published in downstream modules


@validator("assigned")
def check_assigned(cls, v):
users_response = get_all_users()
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't need to load all users into memory to check this. We should consider using _get_user_by_username here or writing a sql query that counts the number of users with a given username.

backend/requirements.txt Outdated Show resolved Hide resolved
@TueeNguyen
Copy link
Collaborator Author

I'll add more changes tomorrow.

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.

Backend validation for POST /leads endpoint
2 participants