mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-24 23:56:40 +02:00
docs(crm): report Lexware import 500 bug — tenantId passed as type instead of value
Bug in lexware-contacts.service.ts:229 — tenantId: String (type) instead of tenantId: user.tenantId (value). Affects importCompany, likely also importContact. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
84bfb75c18
commit
5bc9aebf64
1 changed files with 53 additions and 0 deletions
|
|
@ -960,4 +960,57 @@ Die CRM-Settings-Seite (`/crm/settings`) wurde von gestapelten Cards auf ein **T
|
|||
|
||||
---
|
||||
|
||||
## 2026-03-11 | Frontend: Bug-Report — Lexware Import Company schlaegt fehl (500)
|
||||
|
||||
### Problem
|
||||
|
||||
Beim Klick auf "Unternehmen" (Import als Company) im Lexware Sync Tab kommt ein **500 Internal Server Error**.
|
||||
|
||||
### Fehlermeldung (aus `docker logs insight-crm`)
|
||||
|
||||
```
|
||||
PrismaClientValidationError:
|
||||
Invalid `this.prisma.company.create()` invocation in
|
||||
/app/src/lexware/lexware-contacts.service.ts:229:32
|
||||
|
||||
→ 229 return this.prisma.company.create({
|
||||
data: {
|
||||
name: "team neusta SE",
|
||||
email: "k.sauer@neusta.de",
|
||||
phone: undefined,
|
||||
street: "Konsul-Smidt-Straße 24",
|
||||
zip: "28217",
|
||||
city: "Bremen",
|
||||
country: "DE",
|
||||
notes: undefined,
|
||||
lexwareContactId: "e23f5165-9c1e-40ba-9536-9990703421df",
|
||||
lexwareContactVersion: 6,
|
||||
lexwareSyncedAt: new Date("2026-03-11T09:05:10.318Z"),
|
||||
createdBy: "4627b01c-2f23-4ee8-a44e-c04bff068a5f",
|
||||
+ tenantId: String ← FEHLER: Typ "String" statt UUID-Wert
|
||||
},
|
||||
```
|
||||
|
||||
### Ursache
|
||||
|
||||
In `lexware-contacts.service.ts` Zeile 229 wird `tenantId` als **TypeScript-Typ `String`** uebergeben statt als tatsaechlicher UUID-Wert aus dem JWT-Token. Vermutlich steht dort so etwas wie `tenantId: String` statt `tenantId: user.tenantId` oder `tenantId: this.tenantId`.
|
||||
|
||||
### Betroffene Datei
|
||||
|
||||
`packages/crm-service/src/lexware/lexware-contacts.service.ts` — Zeile ~229 (`importCompany`-Methode)
|
||||
|
||||
### Vermutlich gleicher Fehler bei
|
||||
|
||||
- `importContact` (Lexware-Kontakt als CRM Contact importieren)
|
||||
- Eventuell auch `push` und `sync` Methoden, falls diese ebenfalls `tenantId` setzen
|
||||
|
||||
### Reproduktion
|
||||
|
||||
1. `/crm/settings` → Tab "Lexoffice Sync" → "Import (Lexware → CRM)"
|
||||
2. Beliebigen Lexware-Kontakt suchen (z.B. "team")
|
||||
3. Auf "Unternehmen" Button klicken
|
||||
4. → Rote Fehlermeldung: "Import fehlgeschlagen: Request failed with status code 500"
|
||||
|
||||
---
|
||||
|
||||
*Bitte neue Eintraege unten anfuegen. Format: `## YYYY-MM-DD | Absender: Betreff`*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue