appwrite / appwrite/sdk-for-python

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

Abierto
#139 1 comentario 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Python
Estrellas
268
Forks
67
Merge medio
11 h 59 min
PR fusionados (30 d)
2

Descripción

### 👟 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)

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza localizando el modelo Row de Pydantic y la ruta de TablesDB.create_row(), y luego compara la estructura de respuesta producida cuando se proporciona transaction_id con los campos obligatorios del modelo. Confirma la corrección reproduciendo la llamada de transacción a create_row() y verificando que su respuesta se deserializa sin los errores de validación de $createdAt y $updatedAt.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
api
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
68/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.