Skip to content

Commit 48a1255

Browse files
committed
[Fix] pop找不到extra的问题
1 parent 73f0bbc commit 48a1255

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vnpy_postgresql/postgresql_database.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +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")
179+
d.pop("extra", None)
180180
data.append(d)
181181

182182
# 使用upsert操作将数据更新到数据库中 chunked批量操作加快速度
@@ -250,7 +250,7 @@ def save_tick_data(self, ticks: list[TickData], stream: bool = False) -> bool:
250250
d["exchange"] = d["exchange"].value
251251
d.pop("gateway_name")
252252
d.pop("vt_symbol")
253-
d.pop("extra")
253+
d.pop("extra", None)
254254
data.append(d)
255255

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

0 commit comments

Comments
 (0)