diff --git a/job.py b/job.py index d91a094..ff43bcf 100644 --- a/job.py +++ b/job.py @@ -78,13 +78,6 @@ class PA_JobManager_Message(PA,db.Model): job = db.relationship ("Job" ) -################################################################################ -# GetJM_Message: used in html to display any message for this front-end -################################################################################ -def GetJM_Message(): - msg=PA_JPA_JobManager_MessageobManager_Message.query.first() - return msg - ################################################################################ # Used in main html to show a red badge of # jobs to draw attention there are # active jobs being processed in the background @@ -344,3 +337,14 @@ def _jinja2_filter_datetime(date, fmt=None): return date.strftime("%d/%m/%Y %I:%M:%S %p") else: return "N/A" + +################################################################################ +# allow a way to force the messages to be deleted if really needed - its a bit +# lame, but a quick fix +################################################################################ +@app.route('/force_clear') +@login_required +def force_clear(): + PA_JobManager_Message.query.delete(); + db.session.commit() + return redirect("/")