Skip to content

Commit de73934

Browse files
committed
attempt to resolve conflicts with migration path
1 parent a4e29ae commit de73934

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

opensensor/collection_apis.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@
5454
"Moisture": "moisture_readings",
5555
}
5656

57-
column_translation = {
57+
environment_translation = {
5858
"temp": "temp",
5959
"rh": "rh",
6060
"pressure": "pressure",
61-
"percent": "lux",
62-
"ppm": "ppm_CO2",
61+
"lux": "lux",
62+
"co2": "ppm_CO2",
63+
"moisture": "moisture_readings",
6364
"pH": "pH",
64-
"readings": "moisture_readings",
6565
}
6666

6767

@@ -121,7 +121,7 @@ def _record_data_to_ts_collection(
121121
model_instance.pop("timestamp", None)
122122

123123
# Translate to the combined collection field names
124-
column_name = column_translation[column_name]
124+
column_name = environment_translation[column_name]
125125

126126
for key, value in model_instance.items():
127127
if value is not None:

0 commit comments

Comments
 (0)