Make account on AssetGroup optional
This commit is contained in:
parent
bdf8f04210
commit
ce0b75ae2d
|
@ -0,0 +1,24 @@
|
|||
# Generated by Django 4.1.6 on 2023-02-11 18:17
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0056_alter_assetrestriction_pairs_parsed'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='assetgroup',
|
||||
name='account',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='core.account'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='assetrestriction',
|
||||
name='pairs_parsed',
|
||||
field=models.JSONField(blank=True, default=list, null=True),
|
||||
),
|
||||
]
|
|
@ -412,7 +412,7 @@ class AssetGroup(models.Model):
|
|||
description = models.TextField(null=True, blank=True)
|
||||
|
||||
# Account for checking pairs on children if specified
|
||||
account = models.ForeignKey(Account, on_delete=models.CASCADE)
|
||||
account = models.ForeignKey(Account, on_delete=models.PROTECT, null=True, blank=True)
|
||||
|
||||
# Dict like {"RUB": True, "USD": False}
|
||||
allowed = models.JSONField(null=True, blank=True, default=dict)
|
||||
|
|
Loading…
Reference in New Issue