Skip to content

Commit 4a4fb24

Browse files
committed
fix: 修复没有插入的问题
1 parent 2297b38 commit 4a4fb24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.9
1+
3.0.10

core/database.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def _commit_response(hour: int, ip_tables: defaultdict[str, int], user_agents: d
186186
return False
187187
session = SESSION.get_session()
188188
q = session.query(ResponseTable).filter_by(hour=hour)
189-
r = q.first() or ResponseTable(hour=hour, ip_tables=b'', success=str(0), forbidden=str(0), redirect=str(0), not_found=str(0), error=str(0))
189+
r = q.first() or ResponseTable(hour=hour, ip_tables=b'', user_agents=b'', success=str(0), forbidden=str(0), redirect=str(0), not_found=str(0), error=str(0))
190190
if q.count() == 0:
191191
session.add(r)
192192
origin_ip_tables: defaultdict[str, int] = defaultdict(lambda: 0)

0 commit comments

Comments
 (0)