mirror of
https://github.com/sartography/cr-connect-workflow.git
synced 2025-02-23 13:18:35 +00:00
Merge pull request #338 from sartography/document-spreadsheet-name-380
Document spreadsheet name #380
This commit is contained in:
commit
7070761089
@ -11,7 +11,7 @@ class DocumentService(object):
|
|||||||
the spreadsheet should contain the columns 'code', 'category1', 'category2', 'category3', 'description' and 'id',
|
the spreadsheet should contain the columns 'code', 'category1', 'category2', 'category3', 'description' and 'id',
|
||||||
code is required for all rows in the table, the other fields are optional. """
|
code is required for all rows in the table, the other fields are optional. """
|
||||||
|
|
||||||
DOCUMENT_LIST = "irb_documents.xlsx"
|
DOCUMENT_LIST = "documents.xlsx"
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_allowed_document(code):
|
def is_allowed_document(code):
|
||||||
|
25
migrations/versions/c16d3047abbe_.py
Normal file
25
migrations/versions/c16d3047abbe_.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
"""change irb_documents to documents
|
||||||
|
|
||||||
|
Revision ID: c16d3047abbe
|
||||||
|
Revises: bbf064082623
|
||||||
|
Create Date: 2021-07-07 13:07:53.966102
|
||||||
|
|
||||||
|
"""
|
||||||
|
from alembic import op
|
||||||
|
import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
|
# revision identifiers, used by Alembic.
|
||||||
|
revision = 'c16d3047abbe'
|
||||||
|
down_revision = 'bbf064082623'
|
||||||
|
branch_labels = None
|
||||||
|
depends_on = None
|
||||||
|
|
||||||
|
|
||||||
|
def upgrade():
|
||||||
|
pass
|
||||||
|
op.execute("update file set name = 'documents.xlsx' where name='irb_documents.xlsx'")
|
||||||
|
|
||||||
|
|
||||||
|
def downgrade():
|
||||||
|
op.execute("update file set name = 'irb_documents.xlsx' where name='documents.xlsx'")
|
@ -112,7 +112,7 @@ class TestFilesApi(BaseTest):
|
|||||||
self.assertEqual(0, len(json.loads(rv.get_data(as_text=True))))
|
self.assertEqual(0, len(json.loads(rv.get_data(as_text=True))))
|
||||||
|
|
||||||
def test_set_reference_file(self):
|
def test_set_reference_file(self):
|
||||||
file_name = "irb_documents.xlsx"
|
file_name = "documents.xlsx"
|
||||||
filepath = os.path.join(app.root_path, 'static', 'reference', 'irb_documents.xlsx')
|
filepath = os.path.join(app.root_path, 'static', 'reference', 'irb_documents.xlsx')
|
||||||
with open(filepath, 'rb') as myfile:
|
with open(filepath, 'rb') as myfile:
|
||||||
file_data = myfile.read()
|
file_data = myfile.read()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user