Skip to content

Commit 317c7ec

Browse files
hebaalazzehparthea
andauthored
Update packages/google-api-core/google/api_core/gapic_v1/_method_helpers.py
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent b8a3b32 commit 317c7ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/google-api-core/google/api_core/gapic_v1/_method_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def setup_request_id(request: Any, field_name: str, is_proto3_optional: bool) ->
4444
setattr(request, field_name, str(uuid.uuid4()))
4545
except (AttributeError, ValueError):
4646
# Proto-plus messages or other objects
47-
if field_name not in request:
47+
if not getattr(request, field_name, None):
4848
setattr(request, field_name, str(uuid.uuid4()))
4949
else:
5050
if not getattr(request, field_name):

0 commit comments

Comments
 (0)