File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -939,7 +939,7 @@ def create_pull_request(
939
939
940
940
# fields like ETag and Last-Modified are stored in the response headers, we need to extract them
941
941
header_fields = {
942
- k : self ._github3_session .last_response_headers [ k ]
942
+ k : self ._github3_session .last_response_headers . get ( k , None )
943
943
for k in PullRequestDataValid .HEADER_FIELDS
944
944
}
945
945
Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ class PullRequestDataValid(ValidatedBaseModel):
100
100
}
101
101
"""
102
102
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.
103
105
"""
104
106
105
107
e_tag : str | None = Field (None , alias = "ETag" )
You can’t perform that action at this time.
0 commit comments