[TASK] Add restrictions to foreign keys in models.
This commit is contained in:
parent
47809a0f22
commit
c3b32d5de3
|
@ -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):
|
||||||
|
|
Loading…
Reference in New Issue