From d6ef6b03bf6b89616a377a32ad20fe34a28a8661 Mon Sep 17 00:00:00 2001 From: rw-bsi Date: Mon, 18 Nov 2024 22:33:52 +0000 Subject: [PATCH] FIX: ImproperlyConfigured exception --- ...ter_useradditionalinfo_company_and_more.py | 19 +++++++++++++++++++ models.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 migrations/0004_alter_useradditionalinfo_company_and_more.py diff --git a/migrations/0004_alter_useradditionalinfo_company_and_more.py b/migrations/0004_alter_useradditionalinfo_company_and_more.py new file mode 100644 index 0000000..98bddff --- /dev/null +++ b/migrations/0004_alter_useradditionalinfo_company_and_more.py @@ -0,0 +1,19 @@ +# Generated by Django 5.1.3 on 2024-11-18 22:23 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('ifc_validation_models', '0003_version_useradditionalinfo'), + ] + + operations = [ + migrations.AlterField( + model_name='useradditionalinfo', + name='company', + field=models.ForeignKey(blank=True, help_text='What Company the User belongs to (optional)', null=True, on_delete=django.db.models.deletion.CASCADE, to='ifc_validation_models.company'), + ), + ] diff --git a/models.py b/models.py index 470de09..9423523 100644 --- a/models.py +++ b/models.py @@ -247,7 +247,7 @@ class UserAdditionalInfo(AuditedBaseModel): help_text='Whether this user belongs to an Authoring Tool vendor (optional)' ) - company = models.OneToOneField( + company = models.ForeignKey( Company, null=True, blank=True,