Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions apps/discord_bot/src/five08/discord_bot/cogs/crm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2607,7 +2607,7 @@ def __init__(
link_user: discord.Member | None,
inferred_contact_meta: dict[str, Any] | None,
target_scope: str,
create_payload_override: dict[str, str] | None = None,
create_payload_override: dict[str, Any] | None = None,
created_target_scope: str = "created",
) -> None:
super().__init__(timeout=180)
Expand Down Expand Up @@ -2657,7 +2657,7 @@ async def confirm_create(
) -> None:
"""Create the inferred contact and continue resume upload."""
await interaction.response.defer(ephemeral=True)
create_payload: dict[str, str] | None = None
create_payload: dict[str, Any] | None = None
try:
if self.create_payload_override:
create_payload = dict(self.create_payload_override)
Expand Down Expand Up @@ -5325,7 +5325,7 @@ def _extract_resume_name_hint(
return self._extract_resume_name_fallback(file_content, filename=filename)

def _populate_name_fields(
self, payload: dict[str, str], *, source_name: str
self, payload: dict[str, Any], *, source_name: str
) -> None:
"""Populate firstName and lastName fields for CRM contact creation payloads."""
first_name, last_name = self.resume_extractor.split_name(
Expand All @@ -5341,7 +5341,7 @@ def _build_resume_create_contact_payload(
file_content: bytes,
*,
filename: str | None = None,
) -> dict[str, str]:
) -> dict[str, Any]:
"""Build a minimal contact create payload from resume hints."""
hints = self._extract_resume_contact_hints(file_content, filename=filename)
name = self._extract_resume_name_hint(file_content, filename=filename)
Expand Down Expand Up @@ -5406,7 +5406,7 @@ def _build_resume_create_contact_payload(
str(item).strip() for item in skills if str(item).strip()
]
if normalized_skills:
payload["skills"] = ", ".join(normalized_skills)
payload["skills"] = normalized_skills

return payload

Expand All @@ -5415,7 +5415,7 @@ async def _build_resume_create_contact_payload_async(
file_content: bytes,
*,
filename: str | None = None,
) -> dict[str, str]:
) -> dict[str, Any]:
"""Build contact payload without blocking the event loop."""
return await asyncio.to_thread(
self._build_resume_create_contact_payload,
Expand Down Expand Up @@ -5458,7 +5458,7 @@ def _build_contact_payload_for_link_user(
user: discord.Member,
file_content: bytes,
filename: str | None = None,
) -> dict[str, str]:
) -> dict[str, Any]:
"""Build contact payload from resume hints plus explicit Discord linkage."""
payload = self._build_resume_create_contact_payload(
file_content=file_content,
Expand All @@ -5481,7 +5481,7 @@ async def _build_contact_payload_for_link_user_async(
user: discord.Member,
file_content: bytes,
filename: str | None = None,
) -> dict[str, str]:
) -> dict[str, Any]:
"""Build link-user payload without blocking the event loop."""
return await asyncio.to_thread(
self._build_contact_payload_for_link_user,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_crm.py
Original file line number Diff line number Diff line change
Expand Up @@ -4344,7 +4344,7 @@ def test_build_resume_create_contact_payload_populates_prospect_details(
assert payload["phoneNumber"] == "+1 555-0100"
assert payload["addressCountry"] == "Canada"
assert payload["cSeniority"] == "senior"
assert payload["skills"] == "Python, fastapi"
assert payload["skills"] == ["Python", "fastapi"]
assert payload["firstName"] == "Jane"
assert payload["lastName"] == "Doe"

Expand Down