Skip to content

Commit

Permalink
strip trailing /
Browse files Browse the repository at this point in the history
because DRF treats foo/.json and foo.json differently
  • Loading branch information
longhotsummer committed Feb 26, 2024
1 parent 2f39497 commit 207acc1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions peachjam/adapters/gazettes.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ def get_updated_docs(self, last_refreshed):

def update_document(self, url):
log.info(f"Updating gazette ... {url}")
if url.endswith("/"):
url = url[:-1]

try:
document = self.client_get(f"{url}.json").json()
Expand Down

0 comments on commit 207acc1

Please sign in to comment.