Fix group parsing in the guest model
All checks were successful
Playwright Tests / test (pull_request) Has been skipped
Add copyright notice / copyright_notice (pull_request) Successful in 26s
Check usage of free licenses / build-static-assets (pull_request) Successful in 35s

This commit is contained in:
Manuel Bustillo 2024-12-11 00:16:35 +01:00
parent 37360264ea
commit be73e7018a

View File

@ -28,7 +28,7 @@ export class Guest implements Entity {
export class GuestSerializer implements Serializable<Guest> {
fromJson(data: any): Guest {
return new Guest(data.id, data.name, data.group_name, data.group_id, data.color, data.status, data.children);
return new Guest(data.id, data.name, data.group?.name, data.group?.id, data.color, data.status, data.children);
}
toJson(guest: Guest): string {