Skip to content

Commit

Permalink
updated accession_number length to 60 so that it will play nicely wit…
Browse files Browse the repository at this point in the history
…h the file upload field

 since its being used as part of the path. Updated a couple tests to populate the accession_field in a form which is now required.
  • Loading branch information
rwblair committed Nov 24, 2015
1 parent fd99f0e commit efc16f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion open_fmri/apps/dataset/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Dataset(models.Model):
summary = models.TextField(null=True)
sample_size = models.IntegerField()
scanner_type = models.TextField(blank=True)
accession_number = models.CharField(max_length=200, blank=True, null=True)
accession_number = models.CharField(max_length=60, unique=True)
acknowledgements = models.TextField(null=True, blank=True)

# These three fields are for any papers associated with the dataset
Expand Down
1 change: 1 addition & 0 deletions open_fmri/apps/dataset/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def test_valid_data(self):
'project_name': 'project name',
'summary': 'summary',
'sample_size': 2,
'accession_number': 'ds0000madeup',
'license_title': 'PPDL',
'workflow_stage': 'SUBMITTED',
'status': 'UNPUBLISHED'
Expand Down
2 changes: 2 additions & 0 deletions open_fmri/apps/dataset/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def test_create_view_login_valid_data(self):
'project_name': 'unique',
'summary': self.dataset.summary,
'sample_size': self.dataset.sample_size,
'accession_number': 'dsmadeup',
'workflow_stage': 'SUBMITTED',
'status': 'UNPUBLISHED',
'curated': False,
Expand Down Expand Up @@ -121,6 +122,7 @@ def test_update_view_login_valid_data(self):
'project_name': 'unique',
'summary': self.dataset.summary,
'sample_size': self.dataset.sample_size,
'accession_number': 'dsmadeup',
'workflow_stage': 'SUBMITTED',
'status': 'UNPUBLISHED',
'curated': False,
Expand Down

0 comments on commit efc16f3

Please sign in to comment.