SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 023c2287 authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Use `SET_NULL` rather than `CASCADE` for SubsidyPayment attachments

parent d8c829d4
No related branches found
No related tags found
No related merge requests found
# Generated by Django 3.2.18 on 2024-03-12 17:22
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('finances', '0029_subsidyattachment_git_url_and_more'),
]
operations = [
migrations.AlterField(
model_name='subsidypayment',
name='invoice',
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='invoice_for', to='finances.subsidyattachment'),
),
migrations.AlterField(
model_name='subsidypayment',
name='proof_of_payment',
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='proof_of_payment_for', to='finances.subsidyattachment'),
),
]
...@@ -150,14 +150,14 @@ class SubsidyPayment(models.Model): ...@@ -150,14 +150,14 @@ class SubsidyPayment(models.Model):
date_scheduled = models.DateField() date_scheduled = models.DateField()
invoice = models.OneToOneField( invoice = models.OneToOneField(
"finances.SubsidyAttachment", "finances.SubsidyAttachment",
on_delete=models.CASCADE, on_delete=models.SET_NULL,
blank=True, blank=True,
null=True, null=True,
related_name="invoice_for", related_name="invoice_for",
) )
proof_of_payment = models.OneToOneField( proof_of_payment = models.OneToOneField(
"finances.SubsidyAttachment", "finances.SubsidyAttachment",
on_delete=models.CASCADE, on_delete=models.SET_NULL,
blank=True, blank=True,
null=True, null=True,
related_name="proof_of_payment_for", related_name="proof_of_payment_for",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment