user_id -> linked_user_id (#410)
This commit is contained in:
parent
79692b2497
commit
434fe17617
4 changed files with 9 additions and 9 deletions
|
|
@ -361,8 +361,8 @@ class UserView(
|
|||
author=request.user,
|
||||
event_name=ChatOpsEvent.USER_UNLINKED,
|
||||
chatops_type=ChatOpsType.TELEGRAM,
|
||||
user=user.username,
|
||||
user_id=user.public_primary_key,
|
||||
linked_user=user.username,
|
||||
linked_user_id=user.public_primary_key,
|
||||
)
|
||||
except TelegramToUserConnector.DoesNotExist:
|
||||
return Response(status=status.HTTP_400_BAD_REQUEST)
|
||||
|
|
@ -383,8 +383,8 @@ class UserView(
|
|||
author=request.user,
|
||||
event_name=ChatOpsEvent.USER_UNLINKED,
|
||||
chatops_type=backend.backend_id,
|
||||
user=user.username,
|
||||
user_id=user.public_primary_key,
|
||||
linked_user=user.username,
|
||||
linked_user_id=user.public_primary_key,
|
||||
)
|
||||
except ObjectDoesNotExist:
|
||||
return Response(status=status.HTTP_400_BAD_REQUEST)
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ def connect_user_to_slack(response, backend, strategy, user, organization, *args
|
|||
author=user,
|
||||
event_name=ChatOpsEvent.USER_LINKED,
|
||||
chatops_type=ChatOpsType.SLACK,
|
||||
user=user.username,
|
||||
user_id=user.public_primary_key,
|
||||
linked_user=user.username,
|
||||
linked_user_id=user.public_primary_key,
|
||||
)
|
||||
user.slack_user_identity = slack_user_identity
|
||||
user.save(update_fields=["slack_user_identity"])
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ class TelegramVerificationCode(models.Model):
|
|||
author=user,
|
||||
event_name=ChatOpsEvent.USER_LINKED,
|
||||
chatops_type=ChatOpsType.TELEGRAM,
|
||||
user=user.username,
|
||||
user_id=user.public_primary_key,
|
||||
linked_user=user.username,
|
||||
linked_user_id=user.public_primary_key,
|
||||
)
|
||||
return connector, created
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ def write_chatops_insight_log(author, event_name: ChatOpsEvent, chatops_type: Ch
|
|||
user_id = author.public_primary_key
|
||||
username = json.dumps(author.username)
|
||||
|
||||
log_line = f'tenant_id={tenant_id} author_id={user_id} author={username} action_type="chat_ops" action_name={event_name.value} chat_ops_type={chatops_type.value}' # noqa
|
||||
log_line = f"tenant_id={tenant_id} author_id={user_id} author={username} action_type=chat_ops action_name={event_name.value} chat_ops_type={chatops_type.value}" # noqa
|
||||
for k, v in kwargs.items():
|
||||
log_line += f" {k}={json.dumps(v)}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue