From 56903475b698580c9409669a5433c489d5ceb74e Mon Sep 17 00:00:00 2001 From: Vermaas <vermaas@astron.nl> Date: Thu, 29 Feb 2024 13:41:55 +0100 Subject: [PATCH] bugfix: could not create new services in the latestmonitor table --- atdb/taskdatabase/models.py | 5 ++++- atdb/taskdatabase/templates/taskdatabase/index.html | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/atdb/taskdatabase/models.py b/atdb/taskdatabase/models.py index 954f70e1..c8547417 100644 --- a/atdb/taskdatabase/models.py +++ b/atdb/taskdatabase/models.py @@ -615,7 +615,10 @@ class Monitor(models.Model): # it has happened that latest_monitoring objects failed to delete, # which leads to a growing database and failure of the 'Hold' button on the Monitoring screen. LatestMonitor.objects.all().delete() - + except: + # if something else is wrong, just continue, so that a new entry can be created + pass + try: # carry over the metadata, if possible latest_metadata = latestMonitor.metadata diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html index ca199e45..51fbf003 100644 --- a/atdb/taskdatabase/templates/taskdatabase/index.html +++ b/atdb/taskdatabase/templates/taskdatabase/index.html @@ -31,7 +31,7 @@ {% include 'taskdatabase/pagination.html' %} </div> </div> - <p class="footer"> Version 23 Feb 2024 + <p class="footer"> Version 29 Feb 2024 </div> {% include 'taskdatabase/refresh.html' %} -- GitLab