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

Problem with duplicate fields in user model #14

Open
mirbon opened this issue Feb 28, 2019 · 0 comments
Open

Problem with duplicate fields in user model #14

mirbon opened this issue Feb 28, 2019 · 0 comments

Comments

@mirbon
Copy link

mirbon commented Feb 28, 2019

In file 'register.api.js', line 91:

    user.role = request.pre.role._id
    user.roleName = request.pre.role.name
    ...
    user = await RestHapi.create(User, user, Log)

why you need to assign the 'virtual' field 'roleName'?
Why is not automatically assigned when the user is created?

I have to add the line:
user.roleRank = request.pre.role.rank
to avoid an error in user creation, but is strange that the virtual field in not automatically generated.

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

No branches or pull requests

1 participant