Skip to content

Commit ecdac4a

Browse files
committed
simplify importRow
1 parent e332588 commit ecdac4a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/Service/RowService.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -869,14 +869,8 @@ public function importRow(Table $table, array $row): int {
869869
]);
870870
$qb->executeStatement();
871871
$id = $this->connection->lastInsertId('*PREFIX*tables_row_sleeves');
872-
$newRow = new Row2();
873-
$newRow->setId($id);
874-
$newRow->setTableId($table->getId());
875-
$newRow->setCreatedBy($table->getOwnership());
876-
$newRow->setCreatedAt($row['createdAt']);
877-
$newRow->setLastEditBy($table->getOwnership());
878-
$newRow->setLastEditAt($row['lastEditAt']);
879-
return (int)$newRow->getId();
872+
873+
return (int)$id;
880874
} catch (\Exception $e) {
881875
$this->logger->error('userMigrationImport insert error: ' . $e->getMessage());
882876
throw new InternalError('userMigrationImport insert error: ' . $e->getMessage());

0 commit comments

Comments
 (0)