为新用户pedro添加删除图书权限报错
为新用户pedro添加删除图书权限报错
`
require("./initial");
const { db } = require("lin-mizar/lin/db");
// eslint-disable-next-line no-unused-vars
const { User, Group, Auth } = require("lin-mizar/lin");

const run = async () => {
  const group = await Group.findOne({
    where: {
      name: "普通分组"
    }
  });
  const user = await User.findOne({
    where: {
      username: "pedro"
    }
  });
  user.group_id = group.id;
  await user.save();

  db.close();
};

run();
`
出现了如下错误！
Cannot convert undefined or null to object
    at Function.keys