Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi authored and romainsacchi committed Oct 15, 2024
2 parents 0390767 + d3f0612 commit d16aaf5
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions premise/electricity.py
Original file line number Diff line number Diff line change
Expand Up @@ -1966,16 +1966,19 @@ def create_missing_power_plant_datasets(self) -> None:

for tech, variable in load_electricity_variables().items():
if not variable.get("exists in database", True):
original = list(
ws.get_many(
self.database,
ws.equals("name", variable["proxy"]["name"]),
ws.equals(
"reference product",
variable["proxy"]["reference product"],
),
)
)[0]
try:
original = list(
ws.get_many(
self.database,
ws.equals("name", variable["proxy"]["name"]),
ws.equals(
"reference product",
variable["proxy"]["reference product"],
),
)
)[0]
except IndexError:
continue

# make a copy
new_dataset = copy.deepcopy(original)
Expand Down

0 comments on commit d16aaf5

Please sign in to comment.