ats score ignired
Deploy to S3 / deploy (push) Successful in 33s Details

INTERGRATE_UI-
ahmed.mujtaba 2026-09-09 21:02:17 +05:00
parent 3933ba55d6
commit bdfae436ac
2 changed files with 7 additions and 2 deletions

View File

@ -148,7 +148,9 @@ class Notifications(SQLModel, table=True):
skip: int = 0, skip: int = 0,
): ):
statement = select(cls).where( statement = select(cls).where(
cls.user_id == user_id, cls.is_deleted == False # noqa: E712 cls.user_id == user_id,
cls.is_deleted == False, # noqa: E712
cls.title != "ATS score ready",
) )
if unread_only: if unread_only:
statement = statement.where(cls.is_read == False) # noqa: E712 statement = statement.where(cls.is_read == False) # noqa: E712
@ -158,6 +160,7 @@ class Notifications(SQLModel, table=True):
cls.user_id == user_id, cls.user_id == user_id,
cls.is_deleted == False, # noqa: E712 cls.is_deleted == False, # noqa: E712
cls.is_read == False, # noqa: E712 cls.is_read == False, # noqa: E712
cls.title != "ATS score ready",
) )
unread = (await session.execute(unread_statement)).scalar_one() unread = (await session.execute(unread_statement)).scalar_one()
statement = statement.order_by(cls.created_at.desc()) statement = statement.order_by(cls.created_at.desc())

View File

@ -29,7 +29,7 @@ from users.models import Users
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# Candidate-history event_type → in-app kind, title, and profile tab. _SILENT_HISTORY_EVENTS = frozenset({"ats.scored"})
_HISTORY_KIND = { _HISTORY_KIND = {
"stage.changed": "application", "stage.changed": "application",
"candidate.created": "application", "candidate.created": "application",
@ -432,6 +432,8 @@ async def notify_candidate_history(
"""One in-app row per job stakeholder for a candidate_history write.""" """One in-app row per job stakeholder for a candidate_history write."""
if row is None: if row is None:
return [] return []
if row.event_type in _SILENT_HISTORY_EVENTS:
return []
try: try:
from job.job_post.models import JobPosts from job.job_post.models import JobPosts