Skip to content

Commit

Permalink
Update DocumentCreate.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathologic authored Jul 18, 2024
1 parent f676196 commit 49db639
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Services/Documents/DocumentCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,12 @@ function () {

public function saveTVs()
{
foreach ($this->tvs['save'] as $value) {
SiteTmplvarContentvalue::updateOrCreate([
'contentid' => $this->documentData['id'], 'tmplvarid' => $value['id']
], ['value' => $value['value']]);
if(isset($this->tvs['save'])) {
foreach ($this->tvs['save'] as $value) {
SiteTmplvarContentvalue::updateOrCreate([
'contentid' => $this->documentData['id'], 'tmplvarid' => $value['id']
], ['value' => $value['value']]);
}
}
if($this->mode == 'edit' && isset($this->tvs['delete'])) {
SiteTmplvarContentvalue::query()
Expand Down

0 comments on commit 49db639

Please sign in to comment.