Skip to content

Commit d890f91

Browse files
committed
testing fix for temp unit not coming through properly.
1 parent f73886f commit d890f91

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

opensensor/collection_apis.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
auth,
3030
device_id_is_allowed_for_user,
3131
get_api_keys_by_device_id,
32-
get_user_from_fief_user,
3332
migration_complete,
3433
reduce_api_keys_to_device_ids,
3534
validate_environment,
@@ -53,15 +52,15 @@
5352
}
5453

5554
new_collections = {
56-
"Temperature": "temp",
55+
"temp": "temp",
5756
"Humidity": "rh",
5857
"Pressure": "pressure",
5958
"Lux": "lux",
6059
"CO2": "ppm_CO2",
6160
"pH": "pH",
6261
"Moisture": "moisture_readings",
63-
"LiquidLevel": "liquid",
64-
"RelayBoard": "relays",
62+
"liquid": "liquid",
63+
"relays": "relays",
6564
}
6665

6766
environment_translation = {
@@ -522,12 +521,8 @@ async def historical_data_route(
522521
detail=f"User {fief_user} is not authorized to access device {device_id}",
523522
)
524523

525-
# TODO - Refactor this after migration to FreeTier complete
526-
user = get_user_from_fief_user(fief_user)
527-
if user:
528-
collection_name = user.collection_name
529-
else:
530-
collection_name = "FreeTier"
524+
# TODO - Refactor this to support paid collections
525+
collection_name = "FreeTier"
531526

532527
return sample_and_paginate_collection(
533528
entity,

0 commit comments

Comments
 (0)