diff --git a/remoteappmanager/restresources/application.py b/remoteappmanager/restresources/application.py
index 78ebec9..72de8fe 100644
--- a/remoteappmanager/restresources/application.py
+++ b/remoteappmanager/restresources/application.py
@@ -60,4 +60,11 @@ class Application(Resource):
         container, if active, as values."""
         apps = self.application.db.get_apps_for_user(self.current_user.account)
 
-        return [mapping_id for mapping_id, _, _ in apps]
+        container_manager = self.application.container_manager
+
+        result = []
+        for mapping_id, app, policy in apps:
+            if (yield container_manager.image(app.image)) is not None:
+                result.append(mapping_id)
+
+        return result

Investigate why the REST layer returns an application that is no longer present
Related to #221, the root issue is that the applications list is returning an entry that is not available.
While PR #223 fixes the issue client side, the entry should not be there to begin with in the initial response.

diff --git a/remoteappmanager/restresources/tests/test_application.py b/remoteappmanager/restresources/tests/test_application.py
index 971074c..daabb5b 100644
--- a/remoteappmanager/restresources/tests/test_application.py
+++ b/remoteappmanager/restresources/tests/test_application.py
@@ -30,6 +30,7 @@ class TestApplication(AsyncHTTPTestCase):
 
         application_mock_2 = Mock()
         application_mock_2.image = "hello2"
+
         app.db.get_apps_for_user = Mock(return_value=[
             ("one", application_mock_1, Mock()),
             ("two", application_mock_2, Mock()),
@@ -56,6 +57,16 @@ class TestApplication(AsyncHTTPTestCase):
             self.assertEqual(escape.json_decode(res.body),
                              {"items": ["one", "two"]})
 
+            # Check if nothing is returned if no images are present
+            self._app.container_manager.image = mock_coro_factory(
+                return_value=None)
+
+            res = self.fetch("/api/v1/applications/")
+
+            self.assertEqual(res.code, httpstatus.OK)
+            self.assertEqual(escape.json_decode(res.body),
+                             {"items": []})
+
     def test_retrieve(self):
         def prepare_side_effect(*args, **kwargs):
             user = Mock()

pip install -e .[dev]
parse_log_pytest
requirements.txt
coverage mock responses pytest
apt-get update apt-get install -y gcc
3.4
test_requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alembic==1.7.7
async-generator==1.10
attrs==22.2.0
certifi==2021.5.30
certipy==0.1.3
cffi==1.15.1
charset-normalizer==2.0.12
click==8.0.4
coverage==6.2
cryptography==40.0.2
decorator==5.1.1
docker-py==1.10.6
docker-pycreds==0.4.0
entrypoints==0.4
escapism==1.0.1
greenlet==2.0.2
idna==3.10
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig==1.1.1
ipython-genutils==0.2.0
Jinja2==3.0.3
jsonschema==3.2.0
jupyter-client==7.1.2
jupyter-core==4.9.2
jupyter-telemetry==0.1.0
jupyterhub==2.3.1
Mako==1.1.6
MarkupSafe==2.0.1
mock==5.2.0
nest-asyncio==1.6.0
oauthlib==3.2.2
packaging==21.3
pamela==1.2.0
pluggy==1.0.0
prometheus-client==0.17.1
py==1.11.0
pycparser==2.21
pyOpenSSL==23.2.0
pyparsing==3.1.4
pyrsistent==0.18.0
pytest==7.0.1
python-dateutil==2.9.0.post0
python-json-logger==2.0.7
pyzmq==25.1.2
-e git+https://github.com/simphony/simphony-remote.git@0b766c7d2243945b67e542f81a313dda12ee6d52#egg=remoteappmanager
requests==2.27.1
responses==0.17.0
ruamel.yaml==0.18.3
ruamel.yaml.clib==0.2.8
six==1.17.0
SQLAlchemy==1.4.54
tabulate==0.8.10
tomli==1.2.3
tornado==6.1
traitlets==4.3.3
typing_extensions==4.1.1
urllib3==1.26.20
websocket-client==1.3.1
zipp==3.6.0

name: simphony-remote
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alembic==1.7.7
      - async-generator==1.10
      - attrs==22.2.0
      - certipy==0.1.3
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - click==8.0.4
      - coverage==6.2
      - cryptography==40.0.2
      - decorator==5.1.1
      - docker-py==1.10.6
      - docker-pycreds==0.4.0
      - entrypoints==0.4
      - escapism==1.0.1
      - greenlet==2.0.2
      - idna==3.10
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - ipython-genutils==0.2.0
      - jinja2==3.0.3
      - jsonschema==3.2.0
      - jupyter-client==7.1.2
      - jupyter-core==4.9.2
      - jupyter-telemetry==0.1.0
      - jupyterhub==2.3.1
      - mako==1.1.6
      - markupsafe==2.0.1
      - mock==5.2.0
      - nest-asyncio==1.6.0
      - oauthlib==3.2.2
      - packaging==21.3
      - pamela==1.2.0
      - pluggy==1.0.0
      - prometheus-client==0.17.1
      - py==1.11.0
      - pycparser==2.21
      - pyopenssl==23.2.0
      - pyparsing==3.1.4
      - pyrsistent==0.18.0
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - python-json-logger==2.0.7
      - pyzmq==25.1.2
      - requests==2.27.1
      - responses==0.17.0
      - ruamel-yaml==0.18.3
      - ruamel-yaml-clib==0.2.8
      - six==1.17.0
      - sqlalchemy==1.4.54
      - tabulate==0.8.10
      - tomli==1.2.3
      - tornado==6.1
      - traitlets==4.3.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - websocket-client==1.3.1
      - zipp==3.6.0
prefix: /opt/conda/envs/simphony-remote

remoteappmanager/restresources/tests/test_application.py::TestApplication::test_items
remoteappmanager/restresources/tests/test_application.py::TestApplication::test_retrieve
remoteappmanager/restresources/application.py
remoteappmanager/restresources/application.py