[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): class CitaviProjectIdentity(models.Model):
global_identity = models.ForeignKey(PersonGlobalIdentity) global_identity = models.ForeignKey(PersonGlobalIdentity, blank=True, null=True)
project_id = models.ForeignKey(Project) project_id = models.ForeignKey(Project, blank=False, null=False)
citavi_uuid = models.CharField(max_length=255) citavi_uuid = models.CharField(max_length=255, blank=False, null=False)
preferred_id = models.BooleanField() preferred_id = models.BooleanField()
def __unicode__(self): def __unicode__(self):