diff --git a/uniticket/uni_ticket/migrations/0023_alter_ticketassignment_ticket.py b/uniticket/uni_ticket/migrations/0023_alter_ticketassignment_ticket.py new file mode 100644 index 0000000..546ae2f --- /dev/null +++ b/uniticket/uni_ticket/migrations/0023_alter_ticketassignment_ticket.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.9 on 2024-10-25 09:33 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('uni_ticket', '0022_alter_ticketassignment_ticket'), + ] + + operations = [ + migrations.AlterField( + model_name='ticketassignment', + name='ticket', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uni_ticket.ticket'), + ), + ] diff --git a/uniticket/uni_ticket/models.py b/uniticket/uni_ticket/models.py index 22d5f6e..3255866 100644 --- a/uniticket/uni_ticket/models.py +++ b/uniticket/uni_ticket/models.py @@ -1165,7 +1165,7 @@ class TicketAssignment(TimeStampedModel): Ufficio di competenza per la gestione Ticket """ - ticket = models.ForeignKey(Ticket, on_delete=models.CASCADE, db_index=False) + ticket = models.ForeignKey(Ticket, on_delete=models.CASCADE) office = models.ForeignKey( OrganizationalStructureOffice, on_delete=models.PROTECT) note = models.TextField(blank=True, null=True)