Skip to content

Commit b91ee61

Browse files
committed
bug(fcsfile): fix recursion when file has no spill string
1 parent fcef602 commit b91ee61

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

cellengine/resources/fcs_file.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class FcsFile(DataClassMixin):
3636
sample_name: Optional[str] = field(default=ReadOnly(optional=True)) # type: ignore
3737
size: int = field(default=ReadOnly()) # type: ignore
3838
_spill_string: Optional[str] = field(
39-
metadata=config(field_name="spillString"), default=None
39+
metadata=config(field_name="spillString"),
40+
default=None,
4041
)
4142

4243
def __repr__(self):
@@ -275,9 +276,12 @@ def spill_string(self):
275276
if self._spill_string:
276277
return self._spill_string
277278
else:
278-
ss = ce.APIClient().get_fcs_file(self.experiment_id, self._id).spill_string
279-
self._spill_string = ss
280-
return ss
279+
ss = ce.APIClient().get_fcs_file(self.experiment_id, self._id, as_dict=True)
280+
if ss["spillString"]:
281+
self._spill_string = ss["spillString"]
282+
else:
283+
self._spill_string = ""
284+
return self._spill_string
281285

282286
def get_events(
283287
self, inplace: bool = False, destination=None, **kwargs

0 commit comments

Comments
 (0)