fix: add ledger refund uniqueness guard

This commit is contained in:
QiuSW
2026-07-02 16:59:02 +08:00
parent be97a35360
commit 4e8c1b45a4
7 changed files with 93 additions and 8 deletions
@@ -0,0 +1,19 @@
# Generated by Django 5.2.15 on 2026-07-02 08:37
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('billing', '0002_exchangerate_pricingrule'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.AddConstraint(
model_name='pointsledger',
constraint=models.UniqueConstraint(fields=('ref_call', 'change_type'), name='unique_ledger_change_type_per_call'),
),
]