appwrite / appwrite/sdk-for-python

🐛 Bug Report: `create_row` with `transaction_id` fails — Pydantic Row model requires $createdAt / $updatedAt but transactional responses omit them

未关闭
#139 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
Python
星标
268
派生
67
平均合并
11 小时 59 分钟
30 天内合并 PR
2

描述

### 👟 Reproduction steps

- Create a transaction via `TablesDB.create_transaction()`
- Call `TablesDB.create_row(...)` with a transaction_id
- The SDK's Pydantic Row model fails to deserialize the response

### 👍 Expected behavior

`create_row()` to work inside a transaction?

### 👎 Actual Behavior

Throws this error when calling `create_row()`

```
2 validation errors for Row
$createdAt
Field required [type=missing, input_value={'$id': '69c435146902e250...ns': [], '$sequence': 0}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.12/v/missing
$updatedAt
Field required [type=missing, input_value={'$id': '69c435146902e250...ns': [], '$sequence': 0}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.12/v/missing
```

### 🎲 Appwrite version

Different version (specify in environment)

### 💻 Operating system

Linux

### 🧱 Your Environment

Appwrite version: 16.0.0
Python 3.12
Ubuntu-24.04, self-hosted, function ran locally with `appwrite run functions`

### 👀 Have you spent some time to check if this issue has been raised before?

- [x] I checked and didn't find similar issue

### 🏢 Have you read the Code of Conduct?

- [x] I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md)

贡献指南

打开贡献指南

调研方向

首先定位 Pydantic Row 模型和 TablesDB.create_row() 的路径,然后将提供 transaction_id 时生成的响应形状与模型的必需字段进行比较。通过重现 transaction create_row() 调用并验证其响应可以在没有 $createdAt 和 $updatedAt 验证错误的情况下完成反序列化,确认修复有效。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
68/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。