DmitrMakeev commited on
Commit
55e0a69
·
verified ·
1 Parent(s): 0e44910

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -911,8 +911,8 @@ def handle_calculation():
911
  # Фиктивные удобрения
912
  if "fertilizerConstants" in data:
913
  response["fertilizers"] = {
914
- name: {"граммы": 0}
915
- for name in data["fertilizerConstants"]
916
  }
917
 
918
  except Exception as e:
 
911
  # Фиктивные удобрения
912
  if "fertilizerConstants" in data:
913
  response["fertilizers"] = {
914
+ name: {"граммы": round(required_ppm / content, 3)}
915
+ for name, content in data["fertilizerConstants"].items()
916
  }
917
 
918
  except Exception as e: