Skip to content

Commit

Permalink
merging from main
Browse files Browse the repository at this point in the history
  • Loading branch information
oyeniyipa committed Mar 3, 2025
1 parent 46c2104 commit 9133b6c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
13 changes: 3 additions & 10 deletions core/api/people_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,14 @@
from core import services as core_services
from core.schemas import Error
from core.schemas.peoplefinder import (
CountrySchema,
CountryResponse,
CreateProfileRequest,
MinimalPeopleFinderProfile,
ProfileMinimalResponse,
ProfileResponse,
TextChoiceResponseSchema,
UkStaffLocationResponse,
UpdateProfileRequest,
)
from core.schemas.profiles import (
PeopleFinderProfileRequestSchema,
PeopleFinderProfileResponseSchema,
TextChoiceResponseSchema,
UkStaffLocationSchema,
)
from profiles.exceptions import ProfileExists
from profiles.models.combined import Profile
from profiles.models.generic import Country, UkStaffLocation
Expand All @@ -34,7 +27,7 @@
@profile_router.get(
"{slug}",
response={
200: MinimalPeopleFinderProfile,
200: ProfileMinimalResponse,
404: Error,
},
)
Expand Down Expand Up @@ -159,7 +152,7 @@ def update_profile(
@reference_router.get(
"countries/",
response={
200: list[CountrySchema],
200: list[CountryResponse],
404: Error,
},
)
Expand Down
5 changes: 5 additions & 0 deletions core/schemas/peoplefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,8 @@ class Meta:
"organisation",
"building_name",
]


class TextChoiceResponseSchema(Schema):
key: str
value: str
1 change: 1 addition & 0 deletions e2e_tests/test_peoplefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def test_create(combined_profile):
]
}


def test_get_workday(mocker):
url = reverse("people-finder:get_workday")
client = Client()
Expand Down
2 changes: 1 addition & 1 deletion profiles/services/peoplefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from django.contrib.admin.options import get_content_type_for_model
from django.contrib.auth import get_user_model

from profiles.models import Workday
from profiles.exceptions import ProfileExists
from profiles.models import Workday
from profiles.models.generic import Country, Email, UkStaffLocation
from profiles.models.peoplefinder import PeopleFinderProfile
from profiles.types import UNSET, Unset
Expand Down

0 comments on commit 9133b6c

Please sign in to comment.