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

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

Open
robcxyz opened this issue Dec 1, 2024 · 1 comment

Comments

@robcxyz
Copy link
Contributor

robcxyz commented Dec 1, 2024

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
Copy link

#21 fixes this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants