Skip to content

Commit d6131de

Browse files
Merge pull request #23 from Riminder/fix/elgibility_functions
Fix: bugs in eligibility functions
2 parents 678b232 + 30a72c1 commit d6131de

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

hrflow/schemas.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@ class GeneralEntitySchema(BaseModel):
4949
)
5050

5151

52+
class Label(BaseModel):
53+
board_key: str = Field(
54+
..., description="Identification key of the Board attached to the Job."
55+
)
56+
job_key: str = Field(None, description="Identification key of the Job.")
57+
job_reference: t.Optional[str] = Field(
58+
None, description="Custom identifier of the Job."
59+
)
60+
stage: str = Field(..., description="Stage of the job")
61+
date_stage: str = Field(..., description="Date when the job reached this stage")
62+
rating: int = Field(..., description="Rating associated with the job")
63+
date_rating: str = Field(..., description="Date when the rating was given")
64+
65+
5266
class Skill(BaseModel):
5367
name: str = Field(..., description="Identification name of the skill")
5468
type: t.Optional[str] = Field(None, description="Type of the skill. hard or soft")
@@ -306,8 +320,8 @@ class HrFlowProfile(BaseModel):
306320
None, description="Custom identifier of the Profile."
307321
)
308322
info: ProfileInfo = Field(..., description="Object containing the Profile's info.")
309-
text_language: str = Field(
310-
..., description="Code language of the Profile. type: string code ISO 639-1"
323+
text_language: t.Optional[str] = Field(
324+
None, description="Code language of the Profile. type: string code ISO 639-1"
311325
)
312326
text: str = Field(..., description="Full text of the Profile..")
313327
archived_at: t.Optional[str] = Field(
@@ -362,6 +376,6 @@ class HrFlowProfile(BaseModel):
362376
metadatas: t.Optional[t.List[GeneralEntitySchema]] = Field(
363377
None, description="List of metadatas of the Profile."
364378
)
365-
labels: t.Optional[t.List[GeneralEntitySchema]] = Field(
379+
labels: t.Optional[t.List[Label]] = Field(
366380
None, description="List of labels of the Profile."
367381
)

hrflow/utils/scoring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def is_valid_for_scoring(
6969
return is_valid_for_searching(profile) and (
7070
is_valid_experiences_for_scoring(profile.experiences)
7171
or is_valid_educations_for_scoring(profile.educations)
72-
or bool(profile.summary)
72+
or bool(profile.info.summary)
7373
or bool(profile.skills)
7474
or bool(profile.tasks)
7575
)

0 commit comments

Comments
 (0)