Skip to content

fix(PM-4288): Query fix on completed profiles count#61

Merged
hentrymartin merged 3 commits intodevelopfrom
pm-4288_1
Mar 12, 2026
Merged

fix(PM-4288): Query fix on completed profiles count#61
hentrymartin merged 3 commits intodevelopfrom
pm-4288_1

Conversation

@hentrymartin
Copy link
Collaborator

What's in this PR?

  • Query fix on completed profiles count

)
)
AND (
$2::boolean IS NULL

Choose a reason for hiding this comment

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

[⚠️ correctness]
The condition $2::boolean IS NULL OR (...) = $2::boolean could lead to unexpected behavior if $2 is not strictly a boolean or null. Ensure that $2 is always a boolean or null to avoid potential issues.

OR (
(
mtp.value::jsonb ? 'availability'
AND btrim(mtp.value->>'availability') <> ''

Choose a reason for hiding this comment

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

[⚠️ correctness]
Using btrim(mtp.value->>'availability') <> '' assumes that availability is always a string. If availability can be other types (e.g., null or a non-string type), this could lead to runtime errors. Consider adding a type check or ensuring the data type consistency.

@hentrymartin hentrymartin merged commit efe0f29 into develop Mar 12, 2026
5 checks passed
? Number(row.skillCount)
: undefined,
principalSkills: row.principalSkills || undefined,
openToWork: row.openToWork ?? null,

Choose a reason for hiding this comment

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

[💡 style]
Consider using undefined instead of null for openToWork to maintain consistency with other properties in the mapped object, which use undefined for missing values.

: undefined,
principalSkills: row.principalSkills || undefined,
openToWork: row.openToWork ?? null,
isOpenToWork: row.isOpenToWork ?? false,

Choose a reason for hiding this comment

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

[⚠️ correctness]
The default value for isOpenToWork is set to false. Ensure this aligns with the intended logic, as it might affect filtering or display logic elsewhere in the application.

@hentrymartin hentrymartin deleted the pm-4288_1 branch March 12, 2026 16:31
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.

1 participant