Skip to content

Account is not created after CreateGroup() #17

@CCBaxter-Gitlab

Description

@CCBaxter-Gitlab

ox_core:v1.5.6

Hi, I'm trying to create group and create an account at the same time with hasAccount: true

Group is ok, but account is not created

await Ox.CreateGroup({
  name: "job",
  label: "Job",
  type: 'job',
  grades: [{label: "owner", accountRole: "owner"}],
  hasAccount: true,
})

From ox_core below, we generate insertedGrades variable and then this variable is tested : return insertedGrades.affectedRows > 0

But, insertedGrades is an array and not an object so the test is always false and when InsertGroup() return false, group is not setup and account is not created

const insertedGrades = (await conn.batch(

I hope I'm clear
Thanks for work about ox core

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions