Skip to content

Commit

Permalink
#10868 Fix settings table update
Browse files Browse the repository at this point in the history
  • Loading branch information
taslangraham authored and ewhanson committed Jan 31, 2025
1 parent 704fcb9 commit 2050567
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions classes/core/traits/EntityUpdate.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @file classes/core/EntityDAO.php
*
Expand All @@ -15,9 +16,9 @@

namespace PKP\core\traits;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use PKP\core\DataObject;
use PKP\core\EntityDAO;
use PKP\services\PKPSchemaService;

/**
Expand Down Expand Up @@ -119,7 +120,7 @@ public function updateSettings(array $props, int $modelId, $schema = null): void
}

// Entity DAO passes all properties for the update and removes all that aren't set
if (count($deleteSettings) && is_a($this, DataObject::class)) {
if (count($deleteSettings) && is_a($this, EntityDAO::class)) {
DB::table($this->getSettingsTable())
->where($this->getPrimaryKeyName(), '=', $modelId)
->whereIn('setting_name', $deleteSettings)
Expand Down

0 comments on commit 2050567

Please sign in to comment.