Skip to content

Commit d7bbfea

Browse files
committed
Remove raw SQL condition from CollectionFileSizeTrigger.
The `pgtrigger.Condition('OLD.* IS DISTINCT FROM NEW.*')` condition is equivalent to `pgtrigger.AnyChange()`, which is easier to inspect and reason about. This change replaces the former with the latter.
1 parent 6ae81b1 commit d7bbfea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/stac_api/pgtriggers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class IncreaseCounterTrigger(pgtrigger.Trigger):
349349
CollectionFileSizeTrigger(
350350
name='update_col_asset_col_file_size_trigger',
351351
operation=pgtrigger.Update,
352-
condition=pgtrigger.Condition('OLD.* IS DISTINCT FROM NEW.*'),
352+
condition=pgtrigger.AnyChange(),
353353
)
354354
]
355355

0 commit comments

Comments
 (0)