Commit c2fc965
committed
fix: Use keyword argument for RemoveStatisticsUpdate instantiation
Fixes #2558
When removing snapshots with statistics, RemoveStatisticsUpdate was being
instantiated with a positional argument, which violates Pydantic's BaseModel
requirement that all fields be passed as keyword arguments.
This caused a TypeError: BaseModel.__init__() takes 1 positional argument
but 2 were given when calling table.maintenance.expire_snapshots().
Changed from:
RemoveStatisticsUpdate(statistics_file.snapshot_id)
To:
RemoveStatisticsUpdate(snapshot_id=statistics_file.snapshot_id)
All existing tests pass with this fix.1 parent bb41a6d commit c2fc965
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
| 531 | + | |
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| |||
0 commit comments