Skip to content

Commit e34571a

Browse files
committed
API: Projecting them away.
1 parent bafb4cb commit e34571a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

dp3/api/routers/entity.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ def get_eid_master_record_handler(
3737
# TODO: This is probably not the most efficient way. Maybe gather only
3838
# plain data from master record and then call `get_timeseries_history`
3939
# for timeseries.
40-
master_record = DB.get_master_record(etype, eid)
41-
if "_id" in master_record:
42-
del master_record["_id"]
43-
if "#hash" in master_record:
44-
del master_record["#hash"]
40+
master_record = DB.get_master_record(
41+
etype, eid, projection={"_id": False, "#hash": False, "#min_t2s": False}
42+
)
4543

4644
entity_attribs = MODEL_SPEC.attribs(etype)
4745

0 commit comments

Comments
 (0)