Skip to content

Commit 878dfd4

Browse files
committed
make HTTP caching headers optional
1 parent f1d96d1 commit 878dfd4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

conda_forge_tick/git_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ def create_pull_request(
939939

940940
# fields like ETag and Last-Modified are stored in the response headers, we need to extract them
941941
header_fields = {
942-
k: self._github3_session.last_response_headers[k]
942+
k: self._github3_session.last_response_headers.get(k, None)
943943
for k in PullRequestDataValid.HEADER_FIELDS
944944
}
945945

conda_forge_tick/models/pr_json.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ class PullRequestDataValid(ValidatedBaseModel):
100100
}
101101
"""
102102
A set of all header fields that are stored in the PR object.
103+
Header fields are assumed to be used for caching purposes and always optional.
104+
The corresponding fields should be set to None if they are not present in the response.
103105
"""
104106

105107
e_tag: str | None = Field(None, alias="ETag")

0 commit comments

Comments
 (0)