@@ -16,9 +16,9 @@ def check_team_exists(backend_url, team_id, user_principal_id):
1616 exists: bool
1717 """
1818 check_endpoint = backend_url .rstrip ('/' ) + f'/api/v3/team_configs/{ team_id } '
19- headers = {}
20- if user_principal_id is not None :
21- headers [ 'x-ms-client-principal-id' ] = user_principal_id
19+ headers = {
20+ 'x-ms-client-principal-id' : user_principal_id
21+ }
2222
2323 try :
2424 response = requests .get (check_endpoint , headers = headers )
@@ -39,18 +39,12 @@ def check_team_exists(backend_url, team_id, user_principal_id):
3939
4040backend_url = sys .argv [1 ]
4141directory_path = sys .argv [2 ]
42- user_principal_id = sys .argv [3 ] if len (sys .argv ) > 3 else None
42+ user_principal_id = sys .argv [3 ] if len (sys .argv ) > 3 else "00000000-0000-0000-0000-000000000000"
4343
4444# Convert to absolute path if provided as relative
4545directory_path = os .path .abspath (directory_path )
4646print (f"Scanning directory: { directory_path } " )
4747
48- # Determine if we should use authentication headers
49- use_auth_headers = user_principal_id is not None
50- if use_auth_headers :
51- print (f"Using authentication with user ID: { user_principal_id } " )
52- else :
53- print ("No authentication - backend will use development mode" )
5448
5549files_to_process = [
5650 ("hr.json" , "00000000-0000-0000-0000-000000000001" ),
@@ -84,9 +78,9 @@ def check_team_exists(backend_url, team_id, user_principal_id):
8478 files = {
8579 'file' : (filename , file_data , 'application/json' )
8680 }
87- headers = {}
88- if use_auth_headers :
89- headers [ 'x-ms-client-principal-id' ] = user_principal_id
81+ headers = {
82+ 'x-ms-client-principal-id' : user_principal_id
83+ }
9084
9185 params = {
9286 'team_id' : team_id
0 commit comments