Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
roaga committed Sep 3, 2024
1 parent 5b5c797 commit b3ec817
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
21 changes: 11 additions & 10 deletions src/migrations/versions/2e22d272d3b8_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,30 @@
Create Date: 2024-09-02 23:08:36.978554
"""
from alembic import op
import sqlalchemy as sa

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = '2e22d272d3b8'
down_revision = '96e56e375579'
revision = "2e22d272d3b8"
down_revision = "96e56e375579"
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('issue_summary',
sa.Column('group_id', sa.BigInteger(), nullable=False),
sa.Column('summary', sa.JSON(), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint('group_id')
op.create_table(
"issue_summary",
sa.Column("group_id", sa.BigInteger(), nullable=False),
sa.Column("summary", sa.JSON(), nullable=False),
sa.Column("created_at", sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint("group_id"),
)
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('issue_summary')
op.drop_table("issue_summary")
# ### end Alembic commands ###
4 changes: 3 additions & 1 deletion src/seer/automation/summarize/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ def run_summarize_issue(request: SummarizeIssueRequest):
summary = summarize_issue(request, **extra_kwargs)

with Session() as session:
db_state = DbIssueSummary(group_id=request.group_id, summary=summary.model_dump(mode="json"))
db_state = DbIssueSummary(
group_id=request.group_id, summary=summary.model_dump(mode="json")
)
session.merge(db_state)
session.commit()

Expand Down

0 comments on commit b3ec817

Please sign in to comment.