Commit b460ec87 authored by Anya Habana's avatar Anya Habana

Fixed migration error by setting ForeignKey null parameter to True

parent 918ec07e
No preview for this file type
# Generated by Django 3.2.12 on 2022-04-04 14:39
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('homepage', '0002_auto_20220404_1025'),
]
operations = [
migrations.AlterField(
model_name='widgetuser',
name='department',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='users', to='homepage.department'),
),
]
...@@ -11,4 +11,4 @@ class WidgetUser(models.Model): ...@@ -11,4 +11,4 @@ class WidgetUser(models.Model):
last_name = models.CharField(max_length=50) last_name = models.CharField(max_length=50)
id_num = models.CharField(max_length=7, default="") id_num = models.CharField(max_length=7, default="")
email = models.EmailField(default="") email = models.EmailField(default="")
department = models.ForeignKey(Department, on_delete=models.CASCADE, related_name="users", default="") department = models.ForeignKey(Department, on_delete=models.CASCADE, null=True, related_name="users")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment