|
|
@@ -47,7 +47,7 @@ def main ( |
|
|
|
|
|
|
|
|
previous_views_count: int | None = ( |
|
|
previous_views_count: int | None = ( |
|
|
VideoHistory |
|
|
VideoHistory |
|
|
.where_has ('videos', lambda q, code = code: q.where ('code', code)) |
|
|
|
|
|
|
|
|
.where_has ('video', lambda q, code = code: q.where ('code', code)) |
|
|
.where ('fetched_at', '<', latest_fetched_at) |
|
|
.where ('fetched_at', '<', latest_fetched_at) |
|
|
.max ('views_count')) |
|
|
.max ('views_count')) |
|
|
if previous_views_count is None: |
|
|
if previous_views_count is None: |
|
|
|