set creditor and debtor to null=False

This commit is contained in:
Thomas Steen Rasmussen 2019-03-30 10:45:36 +01:00
parent ad256b0df4
commit a11cb38471
2 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,24 @@
# Generated by Django 2.1.7 on 2019-03-30 09:45
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('economy', '0009_auto_20190328_0715'),
]
operations = [
migrations.AlterField(
model_name='expense',
name='creditor',
field=models.ForeignKey(help_text='The Creditor to which this expense belongs', on_delete=django.db.models.deletion.PROTECT, related_name='expenses', to='economy.Credebtor'),
),
migrations.AlterField(
model_name='revenue',
name='debtor',
field=models.ForeignKey(help_text='The Debtor to which this revenue belongs', on_delete=django.db.models.deletion.PROTECT, related_name='revenues', to='economy.Credebtor'),
),
]

View file

@ -149,7 +149,6 @@ class Revenue(CampRelatedModel, UUIDModel):
'economy.Credebtor', 'economy.Credebtor',
on_delete=models.PROTECT, on_delete=models.PROTECT,
related_name='revenues', related_name='revenues',
null=True,
help_text='The Debtor to which this revenue belongs', help_text='The Debtor to which this revenue belongs',
) )
@ -273,7 +272,6 @@ class Expense(CampRelatedModel, UUIDModel):
'economy.Credebtor', 'economy.Credebtor',
on_delete=models.PROTECT, on_delete=models.PROTECT,
related_name='expenses', related_name='expenses',
null=True,
help_text='The Creditor to which this expense belongs', help_text='The Creditor to which this expense belongs',
) )