Commit 8c1dcd6
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 a9cb58b commit 8c1dcd6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
| 533 | + | |
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| |||
0 commit comments