We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4c350fa + e308965 commit df2248cCopy full SHA for df2248c
nowcasting_datamodel/read/read_pv.py
@@ -115,7 +115,7 @@ def get_latest_pv_yield(
115
116
def get_pv_yield(
117
session: Session,
118
- pv_systems_ids: List[int],
+ pv_systems_ids: Optional[List[int]] = None,
119
start_utc: Optional[datetime] = None,
120
end_utc: Optional[datetime] = None,
121
) -> Union[List[PVYieldSQL], List[PVSystemSQL]]:
@@ -132,7 +132,8 @@ def get_pv_yield(
132
query = query.join(PVSystemSQL)
133
134
# select only th pv systems we want
135
- query = query.where(PVSystemSQL.id.in_(pv_systems_ids))
+ if pv_systems_ids is not None:
136
+ query = query.where(PVSystemSQL.id.in_(pv_systems_ids))
137
138
# filter on start time
139
if start_utc is not None:
0 commit comments