Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define 'self' model for plugin 'selectModel' return error #1356

Closed
dven84 opened this issue Jul 17, 2017 · 2 comments
Closed

Define 'self' model for plugin 'selectModel' return error #1356

dven84 opened this issue Jul 17, 2017 · 2 comments
Assignees

Comments

@dven84
Copy link
Contributor

dven84 commented Jul 17, 2017

What steps will reproduce the problem?

public function ngRestAttributeTypes()
    {
        return [
            'title' => 'text',
            'parent_id' => [
                'selectModel',
                'modelClass' => self::className(),
                'valueField' => 'id',
                'labelField' => 'title',
            ],
        ];
    }

What do you get?

error 500
error

Adding if (isset($this-> data)) to luya\admin\ngrest\plugins\Select onAfterListFind($event) solves the problem

Additional infos

Q A
LUYA Version 1.0.0-RC3
@TheMaaarc
Copy link
Member

Thanks for reporting, we will look into your issue as soon as possible.

@nadar nadar closed this as completed in 27b4bd0 Aug 18, 2017
@nadar
Copy link
Contributor

nadar commented Aug 18, 2017

@dven84 I have fixed this problem when using the same model as target class, there was also another problem with this kind of use case! thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants