Skip to content

Commit

Permalink
Merge pull request #581 from kids-first/investigator-name
Browse files Browse the repository at this point in the history
✨ Add investigator name to study
  • Loading branch information
dankolbman authored Feb 24, 2021
2 parents 428020b + aec5391 commit 7c147b2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
18 changes: 18 additions & 0 deletions creator/studies/migrations/0022_add_investigator_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.2.13 on 2021-02-23 16:28

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('studies', '0021_add_study_to_version'),
]

operations = [
migrations.AddField(
model_name='study',
name='investigator_name',
field=models.CharField(help_text='The name of the principle investigator of the study', max_length=200, null=True),
),
]
5 changes: 5 additions & 0 deletions creator/studies/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ class Meta:
validators=[RegexValidator(BUCKET_RE)],
help_text="The s3 bucket name",
)
investigator_name = models.CharField(
max_length=200,
help_text="The name of the principle investigator of the study",
null=True,
)
slack_channel = models.CharField(
max_length=80,
help_text="The name of the related Slack channel",
Expand Down
3 changes: 3 additions & 0 deletions creator/studies/mutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ class StudyInput(graphene.InputObjectType):
"Date that this study is expected to be released to the public"
)
)
investigator_name = graphene.String(
description="The name of the principle investigator of this study"
)
bucket = graphene.String(
description="The s3 bucket where data for this study resides"
)
Expand Down
2 changes: 1 addition & 1 deletion creator/studies/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class StudyNode(DjangoObjectType):

class Meta:
model = Study
filter_fields = ["name"]
filter_fields = ["name", "investigator_name"]
exclude = ["user_set"]
interfaces = (graphene.relay.Node,)

Expand Down

0 comments on commit 7c147b2

Please sign in to comment.