Skip to content

Commit

Permalink
do not update non-changing values on update
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVHG committed Nov 29, 2023
1 parent a0e8d65 commit ad321ad
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Project/CommandHandler/ImportProjectCommandHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ public function handle(ImportProject $importProject): void
$project = $this->entityManager->getRepository('ProjectAanvraag:Project')->findOneBy(['platformUuid' => $importProject->getPlatformUuid()]);
if ($project === null) {
$project = new Project();
$project->setUserId($importProject->getUserId());
$project->setGroupId($importProject->getGroupId());
$project->setPlatformUuid($importProject->getPlatformUuid());
$project->setTestApiKeySapi3($importProject->getTestApiKeySapi3());
$project->setLiveApiKeySapi3($importProject->getLiveApiKeySapi3());
$project->setStatus(Project::PROJECT_STATUS_APPLICATION_SENT);
}
$project->setName($importProject->getName());
$project->setDescription($importProject->getDescription());
$project->setGroupId($importProject->getGroupId());
$project->setUserId($importProject->getUserId());
$project->setPlatformUuid($importProject->getPlatformUuid());
$project->setTestApiKeySapi3($importProject->getTestApiKeySapi3());
$project->setLiveApiKeySapi3($importProject->getLiveApiKeySapi3());
$project->setStatus(Project::PROJECT_STATUS_APPLICATION_SENT);

$this->entityManager->persist($project);

Expand Down

0 comments on commit ad321ad

Please sign in to comment.