P0 BUG: POST /api/v1/expenses/ 500 - ModuleNotFoundError: app.models.fleet.org_role #421
Notifications
Total Time Spent: 1 minute
kincses
1 minute
No due date set.
Dependencies
No dependencies set.
Reference: kincses/service-finder#421
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mérföldkő: Master Book 2.0.1 - P0 Bugfix
Cél: Fix ModuleNotFoundError causing 500 Internal Server Error on POST /api/v1/expenses/
🔗 Függőségek (Dependencies)
📝 Elemzés
A
_check_org_capability()függvény azexpenses.py:104sorban hibás import útvonalat használ:from app.models.fleet.org_role import OrgRole→ ModuleNotFoundErrorfrom app.models.marketplace.organization import OrgRoleEmellett a join feltétel is hibás a 108. sorban:
OrganizationMember.role == OrgRole.name(OrgRole-nak nincsnameattribútuma)OrganizationMember.role == OrgRole.name_keyA javítás után a
_check_org_capability()működése konzisztens lesz azassets.py-beli implementációval.▶️ Munka megkezdve: 2026-07-26 15:10:44
✅ Munka befejezve: 2026-07-26 15:12:22
Technikai Összefoglaló:
Root cause identified: 1) Broken import path at line 104: does not exist, must be . 2) Wrong join column at line 108: must be . Fix: 2 lines in expenses.py. Full analysis doc: docs/p0_expense_500_import_bugfix_2026-07-26.md
⏱️ Az idő rögzítve.