Skip to content

Commit

Permalink
actually enable cruise patching
Browse files Browse the repository at this point in the history
  • Loading branch information
DocOtak committed Oct 10, 2023
1 parent 0cb62f7 commit 4d57563
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions trackline/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
level="NOTSET", format=FORMAT, datefmt="[%X]", handlers=[RichHandler()]
)


def has_no_track(cruise) -> bool:
return cruise["geometry"]["track"] == {}

Expand Down Expand Up @@ -65,10 +66,12 @@ def cruise_add_cruise_track_from_cf():

logger.info(f"Generated patch {patch}")

# response = s.patch(f'https://cchdo.ucsd.edu/api/v1/cruise/{cruise["id"]}', json=patch)
response = s.patch(
f'https://cchdo.ucsd.edu/api/v1/cruise/{cruise["id"]}', json=patch
)

# if not response.ok:
# logger.critical("Error patching cruise")
if not response.ok:
logger.critical("Error patching cruise")

logger.info(
f"Cruise {cruise['expocode']} updated with trackline from {file['file_path']}"
Expand Down

0 comments on commit 4d57563

Please sign in to comment.