Skip to content

Commit

Permalink
Fix flaxe8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaraBuettner committed Sep 19, 2023
1 parent 5a85f55 commit a0a408f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions etrago/tools/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def configure_timeindex(self):
)
)

self.timeindex = timeindex[self.start_snapshot - 1 : self.end_snapshot]
self.timeindex = timeindex[self.start_snapshot - 1: self.end_snapshot]

def id_to_source(self):
ormclass = self._mapped["Source"]
Expand Down Expand Up @@ -290,7 +290,7 @@ def series_fetch_by_relname(self, network, name, pypsa_name):
vars()[f"egon_etrago_{name.lower()}_timeseries"], index_col
),
getattr(vars()[f"egon_etrago_{name.lower()}_timeseries"], col)[
self.start_snapshot : self.end_snapshot
self.start_snapshot:self.end_snapshot
],
).filter(
vars()[f"egon_etrago_{name.lower()}_timeseries"].scn_name
Expand Down Expand Up @@ -501,7 +501,7 @@ def results_to_oedb(session, network, args, grid="hv", safe_results=False):
print("Uploading results to db...")
# get last result id and get new one
last_res_id = session.query(max(ResultMeta.result_id)).scalar()
if last_res_id == None:
if last_res_id is None:
new_res_id = 1
else:
new_res_id = last_res_id + 1
Expand Down

0 comments on commit a0a408f

Please sign in to comment.