From 3225ec5fe0f12abf908d9d2a1d4f96defb560ad1 Mon Sep 17 00:00:00 2001 From: tim Date: Wed, 20 Dec 2023 23:17:45 +0100 Subject: [PATCH] Fix new snip creation with content reference --- deploy.php | 4 ++-- src/Service/SnipContent/SnipContentService.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy.php b/deploy.php index 14ac384..901dda4 100644 --- a/deploy.php +++ b/deploy.php @@ -14,7 +14,7 @@ set('repository', 'git@git.loken.nl:ardent/Snips.git'); set('git_tty', true); // Shared files/dirs between deploys -set('shared_dirs', ['var/log', 'var/sessions', 'var/snips']); +set('shared_dirs', ['var/log', 'var/sessions']); set('shared_files', ['.env.local']); //set('writable_dirs', ['var']); set('migrations_config', ''); @@ -24,7 +24,7 @@ set('allow_anonymous_stats', false); host('snips.loken.nl') ->setRemoteUser('www-data') ->set('branch', function () { - return input()->getOption('branch') ?: 'main'; + return input()->getOption('branch') ?: 'master'; }) ->set('deploy_path', '~/snips.loken.nl'); diff --git a/src/Service/SnipContent/SnipContentService.php b/src/Service/SnipContent/SnipContentService.php index 53e73b8..4528a04 100644 --- a/src/Service/SnipContent/SnipContentService.php +++ b/src/Service/SnipContent/SnipContentService.php @@ -28,7 +28,7 @@ readonly class SnipContentService $this->em->persist($content); $this->em->flush(); - $this->snip->setActiveVersion($content->getId()); + $this->snip->setActiveVersion($content); $this->em->persist($this->snip); $this->em->flush(); }