From c3b32d5de32f937038b7469badce8ff4a3488ec3 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Mon, 15 Sep 2014 17:03:09 +0200 Subject: [PATCH] [TASK] Add restrictions to foreign keys in models. --- frontend/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/models.py b/frontend/models.py index 05cc5f9..2c55e67 100644 --- a/frontend/models.py +++ b/frontend/models.py @@ -27,9 +27,9 @@ class PersonGlobalIdentity(models.Model): class CitaviProjectIdentity(models.Model): - global_identity = models.ForeignKey(PersonGlobalIdentity) - project_id = models.ForeignKey(Project) - citavi_uuid = models.CharField(max_length=255) + global_identity = models.ForeignKey(PersonGlobalIdentity, blank=True, null=True) + project_id = models.ForeignKey(Project, blank=False, null=False) + citavi_uuid = models.CharField(max_length=255, blank=False, null=False) preferred_id = models.BooleanField() def __unicode__(self):