We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34cb051 commit 3b6fa76Copy full SHA for 3b6fa76
dpbench/infrastructure/datamodel.py
@@ -190,5 +190,11 @@ def store_postfix(conn: Engine, postfix: Postfix):
190
:return:
191
"""
192
with Session(conn) as session:
193
- session.add(postfix)
194
- session.commit()
+ existing_postfix = (
+ session.query(Postfix)
195
+ .filter_by(run_id=postfix.run_id, postfix=postfix.postfix)
196
+ .first()
197
+ )
198
+ if existing_postfix is None:
199
+ session.add(postfix)
200
+ session.commit()
0 commit comments