diff --git a/server/README.md b/server/README.md deleted file mode 100644 index 6913844..0000000 --- a/server/README.md +++ /dev/null @@ -1,3 +0,0 @@ -[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) - -Welcome! This is a dedicated repository to how I'll manage the many plants I care for on a day to day basis. diff --git a/server/app.py b/server/app.py index 6fa8302..62d3118 100644 --- a/server/app.py +++ b/server/app.py @@ -232,10 +232,10 @@ def create_system(): db.commit() # Potentially create lights that were created alongside the system - potentially_new_lights = new_system_json["light"] - if potentially_new_lights is not None: + potentially_new_light = new_system_json["light"] + if potentially_new_light is not None: logger.info("Attempting to create embedded lights from system request") - potentially_new_lights["system_id"] = system.id + potentially_new_light["system_id"] = new_system.id count = potentially_new_light["count"] if potentially_new_light["count"] else 1 new_lights = [create_light_from_json(potentially_new_light) for i in range(count)] db.add(new_lights)