Updated Visit entity so that the short URL is nullable

This commit is contained in:
Alejandro Celaya
2021-02-07 11:02:50 +01:00
parent a1fb44f2a6
commit 23cffce861
3 changed files with 5 additions and 12 deletions

View File

@@ -38,7 +38,7 @@ final class MercureUpdatesGenerator implements MercureUpdatesGeneratorInterface
$topic = sprintf('%s/%s', self::NEW_VISIT_TOPIC, $shortUrl->getShortCode());
return new Update($topic, $this->serialize([
'shortUrl' => $this->transformer->transform($visit->getShortUrl()),
'shortUrl' => $this->transformer->transform($shortUrl),
'visit' => $visit,
]));
}