Skip to content

Commit 73f0bbc

Browse files
committed
[Mod] 保存数据时跳过extra字段
1 parent 0f6df7d commit 73f0bbc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vnpy_postgresql/postgresql_database.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ def save_bar_data(self, bars: list[BarData], stream: bool = False) -> bool:
176176
d["interval"] = d["interval"].value
177177
d.pop("gateway_name")
178178
d.pop("vt_symbol")
179+
d.pop("extra")
179180
data.append(d)
180181

181182
# 使用upsert操作将数据更新到数据库中 chunked批量操作加快速度
@@ -249,6 +250,7 @@ def save_tick_data(self, ticks: list[TickData], stream: bool = False) -> bool:
249250
d["exchange"] = d["exchange"].value
250251
d.pop("gateway_name")
251252
d.pop("vt_symbol")
253+
d.pop("extra")
252254
data.append(d)
253255

254256
# 使用upsert操作将数据更新到数据库中

0 commit comments

Comments
 (0)