Skip to content

Commit

Permalink
Merge pull request #1471 from microbiomedata/issue-1469-nmdc-edge-sou…
Browse files Browse the repository at this point in the history
…rce-client

Add `nmdc_edge` as a permissible `source_client` value
  • Loading branch information
pkalita-lbl authored Nov 26, 2024
2 parents d67a9c1 + ad37275 commit f09c6f4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""Add nmdc_edge as a source_client value
Revision ID: 4aee1e10bb24
Revises: b22c459110a0
Create Date: 2024-11-26 19:16:09.105692
"""

from typing import Optional

from alembic import op

# revision identifiers, used by Alembic.
revision: str = "4aee1e10bb24"
down_revision: Optional[str] = "b22c459110a0"
branch_labels: Optional[str] = None
depends_on: Optional[str] = None


def upgrade():
op.execute("ALTER TYPE submissionsourceclient ADD VALUE 'nmdc_edge'")


def downgrade():
op.execute("ALTER TYPE submissionsourceclient DROP VALUE 'nmdc_edge'")
1 change: 1 addition & 0 deletions nmdc_server/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,7 @@ class SubmissionEditorRole(str, enum.Enum):
class SubmissionSourceClient(str, enum.Enum):
submission_portal = "submission_portal"
field_notes = "field_notes"
nmdc_edge = "nmdc_edge"


class SubmissionMetadata(Base):
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/SubmissionPortal/store/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ interface MetadataSubmissionRecord {
locked_by: User;
lock_updated: string;
permission_level: string | null;
source_client: 'submission_portal' | 'field_notes' | null;
source_client: 'submission_portal' | 'field_notes' | 'nmdc_edge' | null;
study_name: string;
templates: string[];
}
Expand Down

0 comments on commit f09c6f4

Please sign in to comment.