Make account on AssetGroup optional

This commit is contained in:
2023-02-11 18:18:07 +00:00
parent bdf8f04210
commit ce0b75ae2d
2 changed files with 25 additions and 1 deletions

View File

@@ -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)