博弈分析按合约分类展示,新增合约下拉选择器
This commit is contained in:
+4
-2
@@ -262,8 +262,9 @@ def seed():
|
||||
|
||||
# --- Seed position snapshots ---
|
||||
existing_pos = {
|
||||
(r.institution, r.direction, r.date)
|
||||
(r.contract_code, r.institution, r.direction, r.date)
|
||||
for r in db.query(
|
||||
PositionSnapshot.contract_code,
|
||||
PositionSnapshot.institution,
|
||||
PositionSnapshot.direction,
|
||||
PositionSnapshot.date,
|
||||
@@ -273,9 +274,10 @@ def seed():
|
||||
snaps = []
|
||||
for inst, direction, date_str, pos, delta, cost in POSITION_DATA_SHORT:
|
||||
d = date.fromisoformat(date_str)
|
||||
if (inst, direction, d) not in existing_pos:
|
||||
if ("FG2609", inst, direction, d) not in existing_pos:
|
||||
snaps.append(
|
||||
PositionSnapshot(
|
||||
contract_code="FG2609",
|
||||
institution=inst,
|
||||
direction=direction,
|
||||
date=d,
|
||||
|
||||
Reference in New Issue
Block a user