Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
clavay authored and trombastic committed Feb 6, 2024
1 parent fee7a10 commit 913337e
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions pyscada/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 913337e

Please sign in to comment.