surrealdb / surrealist

Surrealist is the ultimate way to visually manage your SurrealDB database
https://surrealist.app/
MIT License
1.04k stars 74 forks source link

bigint zoderror #241

Closed furimu1234 closed 2 months ago

furimu1234 commented 2 months ago

Describe the bug Data not displayed

video https://github.com/surrealdb/surrealist/assets/68190216/0b3578ea-d098-43c5-93ee-25506fafe21e

field

profile_setting
user_id
DEFINE FIELD user_id ON profile_setting TYPE option<int> PERMISSIONS FULL
gender_id
DEFINE FIELD gender_id ON profile_setting TYPE option<int> PERMISSIONS FULL
other_ids
DEFINE FIELD other_ids ON profile_setting TYPE array<int> DEFAULT [] PERMISSIONS FULL
other_ids[]
`DEFINE FIELD other_ids[
] ON profile_setting TYPE int PERMISSIONS FULL`

console log error

Uncaught (in promise) ZodError: [
  {
    "code": "invalid_union",
    "unionErrors": [
      {
        "issues": [
          {
            "code": "invalid_type",
            "expected": "string",
            "received": "bigint",
            "path": [],
            "message": "Expected string, received bigint"
          }
        ],
        "name": "ZodError"
      },
      {
        "issues": [
          {
            "code": "invalid_type",
            "expected": "number",
            "received": "bigint",
            "path": [],
            "message": "Expected number, received bigint"
          }
        ],
        "name": "ZodError"
      },
      {
        "issues": [
          {
            "code": "invalid_type",
            "expected": "object",
            "received": "bigint",
            "path": [],
            "message": "Expected object, received bigint"
          }
        ],
        "name": "ZodError"
      },
      {
        "issues": [
          {
            "code": "invalid_type",
            "expected": "array",
            "received": "bigint",
            "path": [],
            "message": "Expected array, received bigint"
          }
        ],
        "name": "ZodError"
      }
    ],
    "path": [],
    "message": "Invalid input"
  }
]

To Reproduce Steps to reproduce the behavior: 1 Set Field type to Int 2 Put the discord user id or channelid into that field 3 see error

Expected behavior Data must be displayed properly.

Environment:

Platform: Desktop OS: Windows_NT Architecture: x86_64 WebView: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0 Version: 2.0.3 Flags: featureFlags: false, models_view: true, apidocs_view: true, themes: false, newsfeed: true

macjuul commented 2 months ago

This should be fixed as of a recent release