From 913337e043e5ed0462fca8e35897def8627a278d Mon Sep 17 00:00:00 2001 From: clavay Date: Tue, 6 Feb 2024 15:03:40 +0100 Subject: [PATCH] remove unused function --- pyscada/admin.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/pyscada/admin.py b/pyscada/admin.py index 9f6c9d7e..5265196e 100755 --- a/pyscada/admin.py +++ b/pyscada/admin.py @@ -444,23 +444,6 @@ def device_name(self, instance): def unit(self, instance): return instance.unit.unit - def last_value(self, instance): - try: - v = Variable.objects.get(id=instance.pk) - if v.query_prev_value(): - return ( - datetime.datetime.fromtimestamp(v.timestamp_old).strftime( - "%Y-%m-%d %H:%M:%S" - ) - + " : " - + v.prev_value.__str__() - + " " - + instance.unit.unit - ) - except Variable.DoesNotExist: - return "Variable does not exist" - return " - : NaN " + instance.unit.unit - def color_code(self, instance): return instance.chart_line_color.color_code()