Spaces:
Runtime error
Runtime error
Update services/db_service.py
Browse files- services/db_service.py +3 -5
services/db_service.py
CHANGED
|
@@ -1,10 +1,9 @@
|
|
| 1 |
import os
|
| 2 |
import uuid
|
| 3 |
from datetime import datetime, date
|
| 4 |
-
from typing import Dict, Any
|
| 5 |
|
| 6 |
from supabase import create_client, Client
|
| 7 |
-
from config.settings import get_settings
|
| 8 |
|
| 9 |
_supabase_client = None
|
| 10 |
|
|
@@ -66,15 +65,14 @@ def format_candidate_data(resume_data: Dict[str, Any]) -> Dict[str, Any]:
|
|
| 66 |
|
| 67 |
file_date = resume_data.get("file_modified_date")
|
| 68 |
if isinstance(file_date, datetime):
|
| 69 |
-
db_record["file_modified_date"] = file_date.
|
| 70 |
else:
|
| 71 |
-
db_record["file_modified_date"] =
|
| 72 |
|
| 73 |
return db_record
|
| 74 |
|
| 75 |
|
| 76 |
async def store_candidate_data(resume_data: Dict[str, Any]) -> Dict[str, Any]:
|
| 77 |
-
|
| 78 |
try:
|
| 79 |
supabase = get_supabase_client()
|
| 80 |
|
|
|
|
| 1 |
import os
|
| 2 |
import uuid
|
| 3 |
from datetime import datetime, date
|
| 4 |
+
from typing import Dict, Any
|
| 5 |
|
| 6 |
from supabase import create_client, Client
|
|
|
|
| 7 |
|
| 8 |
_supabase_client = None
|
| 9 |
|
|
|
|
| 65 |
|
| 66 |
file_date = resume_data.get("file_modified_date")
|
| 67 |
if isinstance(file_date, datetime):
|
| 68 |
+
db_record["file_modified_date"] = file_date.strftime("%Y-%m-%dT%H:%M:%S")
|
| 69 |
else:
|
| 70 |
+
db_record["file_modified_date"] = None
|
| 71 |
|
| 72 |
return db_record
|
| 73 |
|
| 74 |
|
| 75 |
async def store_candidate_data(resume_data: Dict[str, Any]) -> Dict[str, Any]:
|
|
|
|
| 76 |
try:
|
| 77 |
supabase = get_supabase_client()
|
| 78 |
|