Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Jobs/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function runNow(array $data, ?Job $job = null): void

// put attributes to metadata as fields
if (!empty($entityName) && $this->getMetadata()->get("scopes.$entityName.hasAttribute")) {
$exportFeedService->putAttributesToMetadata($exportJob->get('exportFeedId'), $data['feed']);
$exportFeedService->putAttributesToMetadata($exportJob->get('exportFeedId') ?? $data['feed']['id'], $data['feed']);
}

$typeService = $exportFeedService->getExportTypeService($data['feed']['type']);
Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/ExportChunk.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function run(Job $job): void

// put attributes to metadata as fields
if (!empty($entityName) && $this->getMetadata()->get("scopes.$entityName.hasAttribute")) {
$exportFeedService->putAttributesToMetadata($exportJob->get('exportFeedId'), $data['feed']);
$exportFeedService->putAttributesToMetadata($exportJob->get('exportFeedId') ?? $data['feed']['id'], $data['feed']);
}

$res = $typeService->createCacheChunk();
Expand Down
6 changes: 4 additions & 2 deletions app/Repositories/ExportJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ protected function afterSave(Entity $entity, array $options = [])
}

// update last status
$this->getEntityManager()->getRepository('ExportFeed')
->updateLastStatus($entity->get('exportFeedId'), $entity->get('state'));
if (!empty($entity->get('exportFeedId'))) {
$this->getEntityManager()->getRepository('ExportFeed')
->updateLastStatus($entity->get('exportFeedId'), $entity->get('state'));
}
}

if (!empty($feed = $entity->get('exportFeed'))) {
Expand Down
1 change: 1 addition & 0 deletions app/Services/ExportFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,7 @@ public function putAttributesToMetadata(string $exportFeedId, ?array $feedData =
}

$exportFeed = $this->getEntityManager()->getEntity('ExportFeed', $exportFeedId);

if (empty($exportFeed)) {
if ($feedData === null) {
return;
Expand Down