sudoblockio / icon-stats

0 stars 1 forks source link

sqla update - Passing primary_key is not supported when also passing a sa_column #20

Open robcxyz opened 3 days ago

robcxyz commented 3 days ago

Starting API... Traceback (most recent call last): File "/opt/icon_stats/main_api.py", line 10, in from icon_stats.api.v1.router import api_router File "/opt/icon_stats/api/v1/router.py", line 3, in from icon_stats.api.v1.endpoints import exchanges_legacy, token_stats, openapi File "/opt/icon_stats/api/v1/endpoints/exchanges_legacy.py", line 10, in from icon_stats.models.cmc_cryptocurrency_quotes_latest import CmcListingsLatestQuote File "/opt/icon_stats/models/cmc_cryptocurrency_quotes_latest.py", line 9, in class CmcListingsLatestQuote(SQLModel, table=True): File "/opt/icon_stats/models/cmc_cryptocurrency_quotes_latest.py", line 29, in CmcListingsLatestQuote last_updated: datetime.datetime = Field( ^^^^^^ File "/usr/local/lib/python3.11/site-packages/sqlmodel/main.py", line 387, in Field field_info = FieldInfo( ^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/sqlmodel/main.py", line 131, in init raise RuntimeError( RuntimeError: Passing primary_key is not supported when also passing a sa_column Stream closed EOF for icon-tracker-berlin-v2/icon-tracker-berlin-v2-stats-api-8665bdcdb4-8fx94 (icon-stats-api)

coder1963 commented 2 days ago

21 fixes this issue