Skip to content

Commit

Permalink
Fix org_id contract
Browse files Browse the repository at this point in the history
  • Loading branch information
athornton committed Mar 28, 2024
1 parent fcc9de7 commit 087abc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rubin_influx_tools/influxclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(
}
)
self.force = force
self.org_id: str | None = None # Will set later
self.org_id = "" # Will set later

async def __aenter__(self) -> Any:
return self
Expand Down Expand Up @@ -162,7 +162,7 @@ async def list_all_with_offset(
return o_list

async def set_org_id(self) -> None:
if self.org_id is not None:
if self.org_id:
return
obj = await self.get(self.api_url + "/orgs", params={"org": self.org})
if not obj or "orgs" not in obj or not obj["orgs"]:
Expand Down

0 comments on commit 087abc5

Please sign in to comment.