Skip to content

Commit

Permalink
make accession non-required, fixes #87
Browse files Browse the repository at this point in the history
  • Loading branch information
helrond committed Jan 27, 2020
1 parent a080c00 commit 11c33db
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions bagdiscovery/migrations/0003_auto_20200127_1819.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 2.2.8 on 2020-01-27 18:19

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('bagdiscovery', '0002_auto_20181119_1527'),
]

operations = [
migrations.AlterField(
model_name='bag',
name='accession',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='bagdiscovery.Accession'),
),
]
2 changes: 1 addition & 1 deletion bagdiscovery/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Accession(models.Model):
class Bag(models.Model):
bag_identifier = models.CharField(max_length=255, unique=True)
bag_path = models.CharField(max_length=255, null=True, blank=True)
accession = models.ForeignKey(Accession, on_delete=models.CASCADE)
accession = models.ForeignKey(Accession, on_delete=models.CASCADE, null=True, blank=True)
data = JSONField(null=True, blank=True)
created = models.DateTimeField(auto_now=True)
last_modified = models.DateTimeField(auto_now_add=True)

0 comments on commit 11c33db

Please sign in to comment.