appwrite / appwrite/sdk-for-python

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

Offen
#139 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Python
Sterne
268
Forks
67
Ø Merge
11 Std. 59 Min.
Gemergte PRs (30 T.)
2

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, das Pydantic-Row-Modell und den Pfad von TablesDB.create_row() zu finden, und vergleiche dann die Antwortstruktur, die erzeugt wird, wenn transaction_id angegeben wird, mit den erforderlichen Feldern des Modells. Bestätige die Behebung, indem du den Transaktionsaufruf von create_row() reproduzierst und überprüfst, dass seine Antwort ohne die Validierungsfehler für $createdAt und $updatedAt deserialisiert wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
api
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
68/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.