Skip to content
Snippets Groups Projects
Commit e8419a04 authored by Hervé  MENAGER's avatar Hervé MENAGER
Browse files

Ppi fields pdb_id and family can be blank

Former-commit-id: a334477697b35ef6e5ca68ecff70604d49a59c9f
parent ab60d00a
No related branches found
No related tags found
No related merge requests found
2d91d7b3598964b2d586b4dbc9db6806ea19fff6
\ No newline at end of file
a95c9b99cc69a1cae8a8fa13dfa234ef88d45f4e
\ No newline at end of file
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-07-27 08:45
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ippidb', '0007_auto_20180727_0822'),
]
operations = [
migrations.AlterField(
model_name='ppi',
name='family',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='ippidb.PpiFamily'),
),
migrations.AlterField(
model_name='ppi',
name='pdb_id',
field=models.CharField(blank=True, max_length=4, null=True, verbose_name='PDB ID'),
),
]
......@@ -212,12 +212,12 @@ class PpiFamily(models.Model):
class Ppi(models.Model):
pdb_id = models.CharField('PDB ID', max_length=4, null=True)
pdb_id = models.CharField('PDB ID', max_length=4, null=True, blank=True)
pockets_nb = models.IntegerField(
'Total number of pockets in the complex', default=1)
symmetry = models.ForeignKey(Symmetry, models.CASCADE)
diseases = models.ManyToManyField(Disease)
family = models.ForeignKey(PpiFamily, models.CASCADE, null=True)
family = models.ForeignKey(PpiFamily, models.CASCADE, null=True, blank=True)
def __str__(self):
return '{} PPI, PDB:{}'.format(self.symmetry.description, self.pdb_id or 'unknown')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment