[TASK] Add restrictions to foreign keys in models.

This commit is contained in:
Jan Philipp Timme 2014-09-15 17:03:09 +02:00
parent 47809a0f22
commit c3b32d5de3
1 changed files with 3 additions and 3 deletions

View File

@ -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):