diff --git a/unicorespawner/api_notifications.py b/unicorespawner/api_notifications.py index 7959334b61b293353dc39bff70032703e46e1f6b..5ce3d3c393b99aea6613cc9aa26eba753f73cb67 100644 --- a/unicorespawner/api_notifications.py +++ b/unicorespawner/api_notifications.py @@ -103,7 +103,8 @@ class SpawnEventsUnicoreAPIHandler(APIHandler): "progress": progress, "html_message": f"<details><summary>{now}: {summary}</summary>{details}</details>", } - spawner.latest_events.append(event) + if hasattr(spawner, "events") and type(spawner.events) == list: + spawner.events.append(event) self.set_status(200)