Merge pull request 'Fix group parsing in the guest model' (#147) from fix-guest-group-parsing into main
Reviewed-on: #147
This commit is contained in:
commit
6d5e57724c
@ -28,7 +28,7 @@ export class Guest implements Entity {
|
|||||||
|
|
||||||
export class GuestSerializer implements Serializable<Guest> {
|
export class GuestSerializer implements Serializable<Guest> {
|
||||||
fromJson(data: any): 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 {
|
toJson(guest: Guest): string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user