fb1b383 fix: handle null category in TransactionCategoryField serialization
📊 Changes
1 file changed (+6 additions, -2 deletions)
View changed files
📝app/apps/api/fields/transactions.py (+6 -2)
📄 Description
Fix AttributeError when serializing transactions with null categories. The to_representation method now checks for None before accessing category properties, returning None instead of crashing.
Fixes issue where API returns 500 error when retrieving transactions without assigned categories.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/eitchtee/WYGIWYH/pull/428
**Author:** [@SerafimPikalov](https://github.com/SerafimPikalov)
**Created:** 12/7/2025
**Status:** ✅ Merged
**Merged:** 12/7/2025
**Merged by:** [@eitchtee](https://github.com/eitchtee)
**Base:** `main` ← **Head:** `fix/null-category-serialization`
---
### 📝 Commits (1)
- [`fb1b383`](https://github.com/eitchtee/WYGIWYH/commit/fb1b383962cbd0c61d66bcf681f717156591a238) fix: handle null category in TransactionCategoryField serialization
### 📊 Changes
**1 file changed** (+6 additions, -2 deletions)
<details>
<summary>View changed files</summary>
📝 `app/apps/api/fields/transactions.py` (+6 -2)
</details>
### 📄 Description
Fix AttributeError when serializing transactions with null categories. The to_representation method now checks for None before accessing category properties, returning None instead of crashing.
Fixes issue where API returns 500 error when retrieving transactions without assigned categories.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/eitchtee/WYGIWYH/pull/428
Author: @SerafimPikalov
Created: 12/7/2025
Status: ✅ Merged
Merged: 12/7/2025
Merged by: @eitchtee
Base:
main← Head:fix/null-category-serialization📝 Commits (1)
fb1b383fix: handle null category in TransactionCategoryField serialization📊 Changes
1 file changed (+6 additions, -2 deletions)
View changed files
📝
app/apps/api/fields/transactions.py(+6 -2)📄 Description
Fix AttributeError when serializing transactions with null categories. The to_representation method now checks for None before accessing category properties, returning None instead of crashing.
Fixes issue where API returns 500 error when retrieving transactions without assigned categories.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.