Merge branch 'develop'

This commit is contained in:
Björn Fromme
2021-07-27 14:06:39 +02:00
2 changed files with 19 additions and 10 deletions
@@ -727,7 +727,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
foreach ($selectionGroup as $selection) foreach ($selectionGroup as $selection)
{ {
$attributes = $selection->attributes(); $attributes = $selection->attributes();
$id = (int) $attributes['id']; $id = (int) $attributes['idbuspro'];
$data[$id] = (string) $attributes['bezeichnung']; $data[$id] = (string) $attributes['bezeichnung'];
} }
@@ -15,6 +15,10 @@ class ImportTimestampService
$line = trim(file($lastImportTimestampPath)[0]); $line = trim(file($lastImportTimestampPath)[0]);
if (empty($line)) {
return null;
}
return \DateTime::createFromFormat('d.m.Y H:i:s', $line); return \DateTime::createFromFormat('d.m.Y H:i:s', $line);
} }
@@ -36,6 +40,11 @@ class ImportTimestampService
} }
$line = trim(file($updatedTimestampPath)[0]); $line = trim(file($updatedTimestampPath)[0]);
if (empty($line)) {
return true;
}
$lastUploadAt = \DateTime::createFromFormat('d.m.Y H:i:s', $line); $lastUploadAt = \DateTime::createFromFormat('d.m.Y H:i:s', $line);
$lastImportAt = $this->readImportTimestamp($importTimestampFile); $lastImportAt = $this->readImportTimestamp($importTimestampFile);