gm
Deploy Iddaai Backend / build-and-deploy (push) Successful in 1m16s

This commit is contained in:
2026-06-10 22:48:05 +03:00
parent 950add373f
commit bb911176df
3 changed files with 60 additions and 7 deletions
+17 -2
View File
@@ -60,8 +60,23 @@ from models.calibration import get_calibrator
class UpperBrainMixin:
def _apply_upper_brain_guards(self, package: Dict[str, Any]) -> Dict[str, Any]:
return BettingBrain().judge(package)
def _apply_upper_brain_guards(
self, package: Dict[str, Any], data: Any = None
) -> Dict[str, Any]:
# V35c: hand the brain the REAL bookmaker MS odds so its reference rows
# can never display synthetic 1/p prices as if they were offered.
ms_real_odds = None
if data is not None:
try:
odds = getattr(data, "odds_data", None) or {}
ms_real_odds = {
"1": self._real_market_odds(odds, "ms_h"),
"X": self._real_market_odds(odds, "ms_d"),
"2": self._real_market_odds(odds, "ms_a"),
}
except Exception:
ms_real_odds = None
return BettingBrain().judge(package, ms_real_odds=ms_real_odds)
v27_engine = package.get("v27_engine")
if not isinstance(v27_engine, dict) or not v27_engine.get("triple_value"):