|
|
|
|
120
|
for collection in self.collections:
|
120
|
for collection in self.collections:
|
121
|
self.simulation.collections.setdefault(collection, []).append(self.id)
|
121
|
self.simulation.collections.setdefault(collection, []).append(self.id)
|
122
|
|
122
|
|
|
|
123
|
+ def remove_collection(self, collection_name: str) -> None:
|
|
|
124
|
+ self.collections.remove(collection_name)
|
|
|
125
|
+ # Manipulate as shared property
|
|
|
126
|
+ simulation_collection = self.simulation.collections[collection_name]
|
|
|
127
|
+ simulation_collection.remove(self.id)
|
|
|
128
|
+ self.simulation.collections[collection_name] = simulation_collection
|
|
|
129
|
+
|
123
|
def __str__(self):
|
130
|
def __str__(self):
|
124
|
return self.__repr__()
|
131
|
return self.__repr__()
|
125
|
|
132
|
|