Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nmdc_edge as a permissible source_client value #1471

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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