0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 04:12:23 +01:00

Fix empty person in REST hooks (#4198)

This commit is contained in:
Michael Matloka 2021-05-04 14:05:05 +02:00 committed by GitHub
parent e6190b0b0f
commit 51a371e5b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,14 +75,13 @@ class Action(models.Model):
def on_perform(self, event):
from posthog.api.event import EventSerializer
from posthog.api.person import PersonSerializer
event.action = self
event.serialized_person = PersonSerializer(event.person).data
payload = EventSerializer(event).data
raw_hook_event.send(
sender=None,
event_name="action_performed",
instance=self,
payload=EventSerializer(event).data,
user=event.team,
sender=None, event_name="action_performed", instance=self, payload=payload, user=event.team,
)
name: models.CharField = models.CharField(max_length=400, null=True, blank=True)