Skip to content

Commit

Permalink
Merge pull request #32 from uc-cdis/fix/append-and-update-persist
Browse files Browse the repository at this point in the history
Add db_session merge to list update
  • Loading branch information
k-burt-uch authored Jan 27, 2025
2 parents 527c7cb + 838d166 commit ab8732c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gen3userdatalibrary/models/user_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pydantic import BaseModel, ConfigDict, Field
from sqlalchemy import UUID, Column, DateTime, Integer, String, UniqueConstraint
from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.ext.mutable import MutableDict
from sqlalchemy.orm import declarative_base

Base = declarative_base()
Expand Down Expand Up @@ -115,7 +116,7 @@ class UserList(Base):
nullable=False,
)

items = Column(JSONB)
items = Column(MutableDict.as_mutable(JSONB))

__table_args__ = (UniqueConstraint("name", "creator", name="_name_creator_uc"),)

Expand Down

0 comments on commit ab8732c

Please sign in to comment.