Skip to content

Commit fa20262

Browse files
committed
updated team_endpoint generator to use global team guid if no local team guid is supplied
1 parent d4ca0a1 commit fa20262

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

gremlinapi/gremlinapi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import logging
77
import time
88

9+
from gremlinapi.config import GremlinAPIConfig as config
10+
911
from gremlinapi.exceptions import (
1012
APIError,
1113
GremlinParameterError,
@@ -27,6 +29,8 @@ def __init__(self):
2729
@classmethod
2830
def _optional_team_endpoint(cls, endpoint, **kwargs):
2931
team_id = cls._warn_if_not_param('teamId', **kwargs)
32+
if not team_id and 'str' in type(config.team_guid):
33+
team_id = config.team_guid
3034
if team_id:
3135
if '/?' in endpoint and not str(endpoint).endswith('?'):
3236
endpoint += f'&teamId={team_id}'

0 commit comments

Comments
 (0)