AttributeError: 'APIKeyUser' object has no attribute 'id'
Sentry Issue: FLAGSMITH-API-4S6
AttributeError: 'APIKeyUser' object has no attribute 'id'
(6 additional frame(s) were not displayed)
...
File "edge_api/identities/serializers.py", line 192, in save
"changed_by_user_id": request.user.id,
This is actually a bit messy to solve since it will break the webhook schema. As you can see here, we are currently always sending the email of the user that made the change. By updating this logic to support API keys, we'll no longer be able to support this.
This will need some thought about e.g. whether we need to version the webhook, etc.
The docs make it look like that changed_by is First Name and Last Name https://docs.flagsmith.com/system-administration/webhooks
Add we return "" for changed_by(using master api Key) for other feature state webhook triggers(i.e: not for edge identity). I'd say either return the name of the master api_key here or add another field for changed_by for master api key