modify plugin name
This commit is contained in:
@@ -116,7 +116,7 @@ class Model extends Base\Model
|
|||||||
/** @var static $select */
|
/** @var static $select */
|
||||||
$select = static::query()->where($condition)->first();
|
$select = static::query()->where($condition)->first();
|
||||||
if (empty($select)) {
|
if (empty($select)) {
|
||||||
$select = duplicate(static::class);
|
$select = new static();
|
||||||
$select->attributes = $attributes;
|
$select->attributes = $attributes;
|
||||||
if (!$select->save()) {
|
if (!$select->save()) {
|
||||||
throw new Exception($select->getLastError());
|
throw new Exception($select->getLastError());
|
||||||
@@ -141,7 +141,7 @@ class Model extends Base\Model
|
|||||||
/** @var static $select */
|
/** @var static $select */
|
||||||
$select = static::query()->where($condition)->first();
|
$select = static::query()->where($condition)->first();
|
||||||
if (empty($select)) {
|
if (empty($select)) {
|
||||||
$select = duplicate(static::class);
|
$select = new static();
|
||||||
}
|
}
|
||||||
$select->attributes = $attributes;
|
$select->attributes = $attributes;
|
||||||
if (!$select->save()) {
|
if (!$select->save()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user