fix: incorrect project payloads

This commit is contained in:
Christy Jacob
2025-01-16 13:29:08 +05:30
parent e8f97baf26
commit 2a0894f3d1
+7 -5
View File
@@ -147,11 +147,13 @@ class Event
*/
public function trimFields(): self
{
$this->project = new Document([
'$id' => $this->project->getId(),
'$internalId' => $this->project->getInternalId(),
'database' => $this->project->getAttribute('database')
]);
if ($this->project) {
$this->project = new Document([
'$id' => $this->project->getId(),
'$internalId' => $this->project->getInternalId(),
'database' => $this->project->getAttribute('database')
]);
}
return $this;
}