fix: add ledger refund uniqueness guard
This commit is contained in:
@@ -192,6 +192,10 @@ class PointsLedger(models.Model):
|
||||
condition=~Q(points_delta=0),
|
||||
name="points_ledger_points_delta_non_zero",
|
||||
),
|
||||
models.UniqueConstraint(
|
||||
fields=("ref_call", "change_type"),
|
||||
name="unique_ledger_change_type_per_call",
|
||||
),
|
||||
]
|
||||
indexes = [
|
||||
models.Index(fields=("user", "created_at")),
|
||||
|
||||
Reference in New Issue
Block a user