[tasks] Scale task sets title properly
All checks were successful
build / test (push) Successful in 1m57s
All checks were successful
build / test (push) Successful in 1m57s
This commit is contained in:
@ -85,6 +85,11 @@ def import_scale_csv(file_path, user_id):
|
||||
|
||||
log_dict["unit_type"] = user.profile.weigh_in_units
|
||||
|
||||
weight_val = log_dict.get("weight")
|
||||
if weight_val is not None:
|
||||
unit = "kg" if user.profile.weigh_in_units == "metric" else "lbs"
|
||||
log_dict["title"] = f"{weight_val} {unit}"
|
||||
|
||||
existing = Scrobble.objects.filter(
|
||||
timestamp=start,
|
||||
task=weigh_in,
|
||||
|
||||
Reference in New Issue
Block a user