@@ -377,7 +377,7 @@ def __get_cloud_credential_printer(self, app_type, console, mode, profile, silen
377377 cli = self
378378 )
379379
380- def checkin (self , profile ):
380+ def checkin (self , profile , console ):
381381 self .login ()
382382 self ._set_available_profiles ()
383383 parts = self ._split_profile_into_parts (profile )
@@ -388,18 +388,21 @@ def checkin(self, profile):
388388 application_name = parts ['app' ]
389389 )
390390
391+ access_type = 'CONSOLE' if console else 'PROGRAMMATIC'
392+
391393 transaction_id = None
392394 application_type = None
393395 for checked_out_profile in self .b .my_access .list_checked_out_profiles ():
394396 same_env = checked_out_profile ['environmentId' ] == ids ['environment_id' ]
395397 same_profile = checked_out_profile ['papId' ] == ids ['profile_id' ]
396- if all ([same_env , same_profile ]):
398+ same_access_type = checked_out_profile ['accessType' ] == access_type
399+ if all ([same_env , same_profile , same_access_type ]):
397400 transaction_id = checked_out_profile ['transactionId' ]
398401
399402 for available_profile in self .available_profiles :
400403 same_env_2 = checked_out_profile ['environmentId' ] == available_profile ['env_id' ]
401404 same_profile_2 = checked_out_profile ['papId' ] == available_profile ['profile_id' ]
402- if all ([same_env_2 , same_profile_2 ]):
405+ if all ([same_env_2 , same_profile_2 , access_type == 'PROGRAMMATIC' ]):
403406 application_type = available_profile ['app_type' ].lower ()
404407 break
405408 break
0 commit comments