appwrite / appwrite/sdk-for-python
🐛 Bug Report: `create_row` with `transaction_id` fails — Pydantic Row model requires $createdAt / $updatedAt but transactional responses omit them
- Lingua principale
- Python
- Stelle
- 268
- Fork
- 67
- Merge medio
- 11h 59m
- PR unite (30g)
- 2
Descrizione
### 👟 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)
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando il modello Row di Pydantic e il percorso di TablesDB.create_row(), quindi confronta la struttura della risposta prodotta quando viene fornito transaction_id con i campi obbligatori del modello. Conferma la correzione riproducendo la chiamata transazionale a create_row() e verificando che la relativa risposta venga deserializzata senza gli errori di validazione relativi a $createdAt e $updatedAt.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 68/100