Skip to content

Commit 21e69ab

Browse files
committed
fixed bug in history where the history would be recorded each time an item was shown in rotation
1 parent 0fb83eb commit 21e69ab

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

model/rotation_system.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,6 @@ def schedule_image(self, design_id: int, duration: int, start_time: datetime,
151151
)
152152
schedule_id = cur.lastrowid
153153
conn.commit()
154-
155-
# Log upload history
156-
cur.execute(
157-
"INSERT INTO upload_history (design_id, attempt_time, status) VALUES (?, CURRENT_TIMESTAMP, ?)",
158-
(design_id, 'successful')
159-
)
160-
conn.commit()
161154
return schedule_id
162155
finally:
163156
cur.close()
@@ -183,13 +176,6 @@ def update_scheduled_item(self, schedule_id: int, design_id: int, duration: int,
183176
(design_id, duration, start_time, override_current, schedule_id)
184177
)
185178
conn.commit()
186-
187-
# Log update history
188-
cur.execute(
189-
"INSERT INTO upload_history (design_id, attempt_time, status) VALUES (?, CURRENT_TIMESTAMP, ?)",
190-
(design_id, 'successful')
191-
)
192-
conn.commit()
193179
finally:
194180
cur.close()
195181
conn.close()

0 commit comments

Comments
 (0)