Skip to content

Commit

Permalink
Use ngRestFind() instead (#403)
Browse files Browse the repository at this point in the history
* Use ngRestFind() insstead

* add changelog
  • Loading branch information
nadar authored Nov 6, 2019
1 parent 6b0b5bc commit d05302a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ In order to read more about upgrading and BC breaks have a look at the [UPGRADE
+ [#401](https://github.com/luyadev/luya-module-admin/issues/401) Fixed logout bug for users without file permission.
+ [#397](https://github.com/luyadev/luya-module-admin/issues/397) i18nAttributeFallbackValue() require to run the onFind() context of the given attribute plugin in order to ensure plugin specific options like `markdown`.
+ [#389](https://github.com/luyadev/luya-module-admin/issues/389) Do not throw an exception by default when pool identifier does not exists in the list of pools.
+ [#403](https://github.com/luyadev/luya-module-admin/pull/403) Use ngRestFind() method for duplicate button instead of find().

## 2.2.2 (23. October 2019)

Expand Down
2 changes: 1 addition & 1 deletion src/buttons/DuplicateActiveButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getDefaultLabel()
*/
public function handle(NgRestModel $model)
{
$data = $model::find()->byPrimaryKey($model->getPrimaryKey())->asArray()->one();
$data = $model::ngRestFind()->byPrimaryKey($model->getPrimaryKey())->asArray()->one();

if (!$data) {
return $this->sendError(Module::t('active_button_duplicate_error', ['message' => 'Model with id ' . $model->getPrimaryKey() . ' not found.']));
Expand Down

0 comments on commit d05302a

Please sign in to comment.