Support ILoadHost hosts

Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
Roy Nieterau 2022-09-14 11:47:52 +02:00 committed by GitHub
parent d5cb828edc
commit d84b175efb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -569,6 +569,11 @@ class SubsetsModel(TreeModel, BaseRepresentationModel):
if self._host:
time_since_refresh = time.time() - self._host_loaded_refresh_time
if time_since_refresh > self._host_loaded_refresh_timeout:
if isinstance(self._host, ILoadHost):
containers = self._host.get_containers()
else:
containers = self._host.ls()
repre_ids = {con.get("representation")
for con in self._host.ls()}
self._loaded_representation_ids = repre_ids