♻️ Get rid of some data duplication

...and a TODO
This commit is contained in:
Gina Häußge committed 2022-02-22 18:08:41 +01:00
1 parent 8be56724f8
commit 939d9585b4
2 files changed
+24 -51

No files matched your search

+1 -2
View File
@@ -463,13 +463,12 @@ def _get_temperature_data(preprocessor):
tempData = printer.get_current_temperatures()
if "history" in request.values and request.values["history"] in valid_boolean_trues:
tempHistory = printer.get_temperature_history()
history = printer.get_temperature_history()
limit = 300
if "limit" in request.values and str(request.values["limit"]).isnumeric():
limit = int(request.values["limit"])
history = list(tempHistory)
limit = min(limit, len(history))
tempData.update(