Skip to content

Commit

Permalink
Move params for email route
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Dec 5, 2024
1 parent 635635d commit 90fe308
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gort/recipes/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ class PostObservingRecipe(BaseRecipe):

name = "post-observing"

email_route: ClassVar[str] = "/logs/night-logs/0/email?only_if_not_sent=1"
email_route: ClassVar[str] = "/logs/night-logs/0/email"

async def recipe(self, send_email: bool = True):
"""Runs the post-observing sequence."""
Expand All @@ -360,7 +360,10 @@ async def recipe(self, send_email: bool = True):

if send_email:
self.gort.log.info("Sending night log email.")
result = await get_lvmapi_route(self.email_route)
result = await get_lvmapi_route(
self.email_route,
params={"only_if_not_sent": True},
)
if not result:
self.gort.log.warning("Night log had already been sent.")

Expand Down

0 comments on commit 90fe308

Please sign in to comment.