Skip to content

Data types in DB are returned as strings, crashes the API #10

Description

@8de2fdb0

Datase returns last_active_at as str.

Guess that is the same for all database Date types.

Traceback (most recent call last):
INFO:     10.89.2.53:52768 - "GET /v1/vector_stores HTTP/1.1" 500 Internal Server Error
  File "/app/main.py", line 187, in list_vector_stores
    last_active_at = int(row["last_active_at"].timestamp()) if row.get("last_active_at") else None
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'timestamp'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions