Skip to content

Commit 2f3ad4e

Browse files
authored
Merge pull request #6699 from bakaphp/hotfix/race-image-conditon-v3
feat: add payment management mutation
2 parents 865abf4 + 1528be1 commit 2f3ad4e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Kanvas/Filesystem/Actions/AttachFilesystemAction.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,13 @@ private function createFileEntity(string $fieldName, SystemModules $systemModule
149149
{
150150
try {
151151
// Try to create the entity
152-
return FilesystemEntities::create([
152+
return FilesystemEntities::firstOrCreate([
153153
'entity_id' => $this->entity->getKey(),
154154
'system_modules_id' => $systemModule->getKey(),
155155
'companies_id' => $this->filesystem->companies_id,
156156
'filesystem_id' => $this->filesystem->getKey(),
157157
'field_name' => $fieldName,
158+
], [
158159
'weight' => $weight,
159160
'is_deleted' => StateEnums::NO->getValue(),
160161
]);

0 commit comments

Comments
 (0)