Skip to content

Commit fbf5ffd

Browse files
committed
feat: remove title and company link
1 parent 813c761 commit fbf5ffd

2 files changed

Lines changed: 0 additions & 11 deletions

File tree

app/database/migrations.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,6 @@
442442
tags JSONB,
443443
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
444444
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
445-
CONSTRAINT uq_job_offers_company_title UNIQUE (company, title)
446445
);""",
447446

448447
]

app/utils/job_offers.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,6 @@ async def add_job_offer(db, job_offer: JobOfferCreate, background_tasks: Backgro
4949
try:
5050
job_offer_data = job_offer.model_dump(mode="json")
5151

52-
existing = await select(db, "job_offers", filter={
53-
"title": job_offer_data["title"],
54-
"company": job_offer_data["company"],
55-
})
56-
if existing:
57-
raise HTTPException(
58-
status_code=400,
59-
detail="A job offer with the same title and company already exists",
60-
)
61-
6252
job_offer_data["id"] = str(uuid4())
6353
background_tasks.add_task(insert, db, "job_offers", job_offer_data)
6454
return {"message": "Job offer created successfully"}

0 commit comments

Comments
 (0)