Skip to content

Commit

Permalink
feat(allowlist): modify on_delete to protect (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
larisa17 authored Jun 28, 2024
1 parent a7a2f03 commit cb8a55e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions api/account/migrations/0031_alter_allowlist_customization.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 4.2.6 on 2024-06-26 08:40

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
dependencies = [
("account", "0030_includedchainid"),
]

operations = [
migrations.AlterField(
model_name="allowlist",
name="customization",
field=models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
related_name="allow_lists",
to="account.customization",
),
),
]
2 changes: 1 addition & 1 deletion api/account/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ class AllowList(models.Model):
)

customization = models.ForeignKey(
Customization, on_delete=models.CASCADE, related_name="allow_lists"
Customization, on_delete=models.PROTECT, related_name="allow_lists"
)

weight = models.DecimalField(default=0.0, max_digits=7, decimal_places=4)

0 comments on commit cb8a55e

Please sign in to comment.