edit spacemodel to use the right keys to integrate with backend

This commit is contained in:
raf-dev1
2025-06-10 10:06:36 +03:00
parent 8e9278c93c
commit 8f7bfa984b

View File

@ -101,7 +101,7 @@ class SpaceModel {
spaceModel: json['spaceModel'] != null
? SpaceTemplateModel.fromJson(json['spaceModel'])
: null,
tags: (json['tags'] as List<dynamic>?)
tags: (json['productAllocations'] as List<dynamic>?)
?.where((item) => item is Map<String, dynamic>) // Validate type
.map((item) => Tag.fromJson(item as Map<String, dynamic>))
.toList() ??
@ -116,7 +116,6 @@ class SpaceModel {
instance.incomingConnection = Connection(
startSpace: instance.parent ?? instance, // Parent space
endSpace: instance, // This space instance
);
}