Commit b8420f3
fix: activity tracking persists on views-counter failure, passes video_id (closes #14)
- Remove early `return` from UNKNOWN_TABLE_COLUMNS/UNSUPPORTED_UPDATE_OPERATIONS
branch so video_activity and user_activity inserts still run even when the
views counter update is unavailable.
- Pass `activity_id=video_id` to `record_user_activity` so each user_activity
row links back to the video that was viewed.
- Add `record_user_activity` patch + `assert_awaited_once` to
`test_record_video_view_success` as a regression guard.
- Update `test_record_video_view_authenticated_user_activity` and
`test_record_video_view_anonymous_user_activity` assertions to include
the new `activity_id=vid` kwarg.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 4610d55 commit b8420f3
2 files changed
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| 480 | + | |
480 | 481 | | |
481 | 482 | | |
482 | 483 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | | - | |
241 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
242 | 248 | | |
243 | 249 | | |
244 | 250 | | |
| |||
253 | 259 | | |
254 | 260 | | |
255 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
256 | 265 | | |
257 | 266 | | |
258 | 267 | | |
| |||
277 | 286 | | |
278 | 287 | | |
279 | 288 | | |
280 | | - | |
| 289 | + | |
281 | 290 | | |
282 | 291 | | |
283 | 292 | | |
| 293 | + | |
284 | 294 | | |
285 | 295 | | |
286 | 296 | | |
| |||
308 | 318 | | |
309 | 319 | | |
310 | 320 | | |
311 | | - | |
| 321 | + | |
312 | 322 | | |
313 | 323 | | |
314 | 324 | | |
| 325 | + | |
315 | 326 | | |
316 | 327 | | |
317 | 328 | | |
| |||
0 commit comments