-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(github-4555): use api_key name for changed_by #4561
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,10 +171,7 @@ def save(self, **kwargs): | |
self.instance.multivariate_feature_state_values, | ||
) | ||
|
||
identity.save( | ||
user=request.user, | ||
master_api_key=getattr(request, "master_api_key", None), | ||
) | ||
identity.save(user=request.user) | ||
|
||
new_value = self.instance.get_value(identity.id) | ||
previous_value = ( | ||
|
@@ -189,7 +186,7 @@ def save(self, **kwargs): | |
"environment_api_key": identity.environment_api_key, | ||
"identity_id": identity.id, | ||
"identity_identifier": identity.identifier, | ||
"changed_by_user_id": request.user.id, | ||
"changed_by": str(request.user), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gagantrivedi changing the signature here will be a problem during the deployment because the old task processor instances will not be able to execute the function with the updated arguments. We need to resolve this please in a new PR. I suggest that we just add a new argument Note: we should probably consider adding some kind of versioning logic to the task processor to handle this in the future too. |
||
"new_enabled_state": self.instance.enabled, | ||
"new_value": new_value, | ||
"previous_enabled_state": getattr(previous_state, "enabled", None), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will start to fail in the future if someone adds the
id
attribute to theAPIKeyUser
class. Will a test pick it up if so? Or should we be more explicit with this check? e.g.