From c54174481b2ead9e1666b1183b2817d7dbf1a4bf Mon Sep 17 00:00:00 2001 From: Johanna England Date: Fri, 20 Jan 2023 12:47:06 +0100 Subject: [PATCH] Set old and new version to "N/A" for new device --- python/nav/ipdevpoll/shadows/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/nav/ipdevpoll/shadows/__init__.py b/python/nav/ipdevpoll/shadows/__init__.py index b1bfdfb793..b658064569 100644 --- a/python/nav/ipdevpoll/shadows/__init__.py +++ b/python/nav/ipdevpoll/shadows/__init__.py @@ -305,8 +305,8 @@ def _post_events_version_changes(self, containers): netbox=containers.get(None, Netbox).get_existing_model(), alert_type=ALERT_TYPE_MAPPING[alert_type], varmap={ - "old_version": old_version, - "new_version": new_version, + "old_version": old_version if old_version else "N/A", + "new_version": new_version if new_version else "N/A", }, ).save()