Merge pull request #86 from sartography/bug/irb-status-update-763

Bug/irb status update #763
This commit is contained in:
Dan Funk 2022-09-23 09:25:38 -04:00 committed by GitHub
commit b88bc6f1ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 3 deletions

View File

@ -17,7 +17,7 @@ APPLICATION_ROOT = re.sub(r'//', '/', '/%s/' % environ.get('APPLICATION_ROOT', d
DB_HOST = environ.get('DB_HOST', default="localhost")
DB_PORT = environ.get('DB_PORT', default="5432")
DB_NAME = environ.get('DB_NAME', default="pb2")
DB_NAME = environ.get('DB_NAME', default="pb")
DB_USER = environ.get('DB_USER', default="crc_user")
DB_PASSWORD = environ.get('DB_PASSWORD', default="crc_pass")
SQLALCHEMY_DATABASE_URI = environ.get(

View File

@ -0,0 +1,24 @@
"""'Open to Enrollment' replacement
Revision ID: 2a10c0990574
Revises: 0659a655b5be
Create Date: 2022-09-19 10:19:24.269914
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '2a10c0990574'
down_revision = '0659a655b5be'
branch_labels = None
depends_on = None
def upgrade():
op.execute("UPDATE irb_info_status SET \"STATUS\" = 'Open to Enrollment' WHERE \"STATUS\" like 'Open to enrollment'")
def downgrade():
op.execute("UPDATE irb_info_status SET \"STATUS\" = 'Open to enrollment' WHERE \"STATUS\" like 'Open to Enrollment'")

View File

@ -117,7 +117,7 @@ class IRBInfoStatus(db.Model):
status = [IRBInfoStatus(STATUS_ID='', STATUS=''),
IRBInfoStatus(STATUS_ID='30', STATUS='In PreReview New Protocol'),
IRBInfoStatus(STATUS_ID='31', STATUS='PreReview Complete New Protocol'),
IRBInfoStatus(STATUS_ID='2', STATUS='Open to enrollment'),
IRBInfoStatus(STATUS_ID='2', STATUS='Open to Enrollment'),
IRBInfoStatus(STATUS_ID='39', STATUS='Withdrawn'),
IRBInfoStatus(STATUS_ID='37', STATUS='Disapproved'),
IRBInfoStatus(STATUS_ID='35', STATUS='Approvable with Conditions')]

View File

@ -152,7 +152,7 @@ class TestSanity(unittest.TestCase):
event_id = '57'
event_string = f"('{event_id}', '{event}')"
status = 'Open to enrollment'
status = 'Open to Enrollment'
status_id ='2'
status_string = f"('{status_id}', '{status}')"