frontend admin refakctorálás
This commit is contained in:
@@ -6,7 +6,7 @@ import httpx
|
||||
from urllib.parse import quote
|
||||
from sqlalchemy import select, text
|
||||
from app.database import AsyncSessionLocal
|
||||
from app.models.marketplace.service import ServiceStaging # JAVÍTOTT IMPORT ÚTVONAL!
|
||||
from app.models.marketplace.staged_data import ServiceStaging # JAVÍTVA: helyes import a trust_score oszloppal rendelkező modellhez
|
||||
import re
|
||||
|
||||
# Logolás MB 2.0 szabvány szerint
|
||||
@@ -91,11 +91,10 @@ class OSMScout:
|
||||
if existing is None:
|
||||
full_addr = f"{postcode} {city}, {tags.get('addr:street', '')} {tags.get('addr:housenumber', '')}".strip(" ,")
|
||||
|
||||
# Bővített JSON a nyers adatokhoz, mert a modelled nem tartalmazza a source és trust oszlopokat
|
||||
# P0 FIX: trust_score most már az ORM objektum mezője, nem csak JSON-ben
|
||||
raw_payload = {
|
||||
"osm_tags": tags,
|
||||
"source": "osm_scout_v2",
|
||||
"trust_score": 20
|
||||
}
|
||||
|
||||
new_entry = ServiceStaging(
|
||||
@@ -105,6 +104,7 @@ class OSMScout:
|
||||
full_address=full_addr,
|
||||
fingerprint=f_print,
|
||||
status="pending",
|
||||
trust_score=20, # P0 FIX: BOT_BASE_SCORE az ORM objektumon
|
||||
raw_data=raw_payload
|
||||
)
|
||||
db.add(new_entry)
|
||||
|
||||
Reference in New Issue
Block a user