不同账号创建相同内容单据,竟然普通账户报错,超管账号就可以创建!

* 描述问题

<我用超管账号去建立单据的时候,完全没问题,但是我用普通账号建立一样的单据内容就提示 null value in column “lifnr” of relation

“t_lfa1” violates not-null constraint的界面弹窗错误,实际上lifnr是个关系型字段,可是你说没权限?我也检查了普通员工对这个表操作的权限,根本没控制到字段>

* 运行环境

  • NocoBase 版本:2.0.52
  • 数据库种类与版本: PostgreSQL 14
  • 操作系统: Linux
  • 部署方式:Create-nocobase-app
  • Docker 镜像版本:
  • NodeJS 版本:

如何重现

< >

预期行为

截图

日志

你好,请问检查的是哪个表的操作权限?
可以检查普通用户对 lifnr字段 关联数据表的操作或者关联数据表的信息权限。

上午多次调整该账户对应表操作的权限,依然还是不行,我试试调整到管理员的权限看看是不是可以~

依然不行,难道在新版多对多字段还要设置什么其他的吗?Jun 03 10:43:16 nocobase-ap yarn[90458]: 2026-06-03 10:43:16 [error] null value in column “lifnr” of relation “t_lfa1” violates not-null constraint extra={“method”:“error-handler”,“err”:“Error\n at Query.run (/home/dr/nocobase/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n at /home/dr/nocobase/node_modules/sequelize/lib/sequelize.js:315:28\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async PostgresQueryInterface.insert (/home/dr/nocobase/node_modules/sequelize/lib/dialects/abstract/query-interface.js:308:21)\n at async model.save (/home/dr/nocobase/node_modules/sequelize/lib/model.js:2490:35)\n at async /home/dr/nocobase/node_modules/sequelize/lib/model.js:1623:11\n at async Promise.all (index 0)\n at async recursiveBulkCreate (/home/dr/nocobase/node_modules/sequelize/lib/model.js:1615:9)\n at async t_lfa1.bulkCreate (/home/dr/nocobase/node_modules/sequelize/lib/model.js:1786:12)\n at async Promise.all (index 0)\n at async BelongsToMany.set (/home/dr/nocobase/node_modules/sequelize/lib/associations/belongs-to-many.js:452:14)\n at async updateMultipleAssociation (/home/dr/nocobase/node_modules/@nocobase/database/lib/update-associations.js:318:5)\n at async updateAssociations (/home/dr/nocobase/node_modules/@nocobase/database/lib/update-associations.js:124:9)\n at async _Repository.create (/home/dr/nocobase/node_modules/@nocobase/database/lib/repository.js:465:5)\n at async descriptor.value (/home/dr/nocobase/node_modules/@nocobase/database/lib/decorators/transaction-decorator.js:84:29)\n at async create (/home/dr/nocobase/node_modules/@nocobase/actions/lib/actions/create.js:37:20)\n at async checkChangesWithAssociation (/home/dr/nocobase/node_modules/@nocobase/plugin-acl/dist/server/middlewares/check-change-with-association.js:135:3)\n at async middleware (/home/dr/nocobase/node_modules/@nocobase/plugin-workflow-request-interceptor/dist/server/RequestInterceptionTrigger.js:176:5)\n at async triggerWorkflowActionMiddleware (/home/dr/nocobase/node_modules/@nocobase/plugin-workflow-action-trigger/dist/server/ActionTrigger.js:61:7)\n at async dataTemplate (/home/dr/nocobase/node_modules/@nocobase/server/lib/middlewares/data-template.js:36:3)\n at async blockChinaRegionList (/home/dr/nocobase/node_modules/@nocobase/plugin-field-china-region/dist/server/index.js:57:9)\n at async app.acl.use.after (/home/dr/nocobase/node_modules/@nocobase/plugin-acl/dist/server/server.js:563:9)”} meta={“err”:“Error\n at Query.run (/home/dr/nocobase/node_modules/sequelize/lib/dialects/postgres/query.js:50:25)\n at /home/dr/nocobase/node_modules/sequelize/lib/sequelize.js:315:28\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async PostgresQueryInterface.insert (/home/dr/nocobase/node_modules/sequelize/lib/dialects/abstract/query-interface.js:308:21)\n at async model.save (/home/dr/nocobase/node_modules/sequelize/lib/model.js:2490:35)\n at async /home/dr/nocobase/node_modules/sequelize/lib/model.js:1623:11\n at async Promise.all (index 0)\n at async recursiveBulkCreate (/home/dr/nocobase/node_modules/sequelize/lib/model.js:1615:9)\n at async t_lfa1.bulkCreate (/home/dr/nocobase/node_modules/sequelize/lib/model.js:1786:12)\n at async Promise.all (index 0)\n at async BelongsToMany.set (/home/dr/nocobase/node_modules/sequelize/lib/associations/belongs-to-many.js:452:14)\n at async updateMultipleAssociation (/home/dr/nocobase/node_modules/@nocobase/database/lib/update-associations.js:318:5)\n at async updateAssociations (/home/dr/nocobase/node_modules/@nocobase/database/lib/update-associations.js:124:9)\n at async _Repository.create (/home/dr/nocobase/node_modules/@nocobase/database/lib/repository.js:465:5)\n at async descriptor.value (/home/dr/nocobase/node_modules/@nocobase/database/lib/decorators/transaction-decorator.js:84:29)\n at async create (/home/dr/nocobase/node_modules/@nocobase/actions/lib/actions/create.js:37:20)\n at async checkChangesWithAssociation (/home/dr/nocobase/node_modules/@nocobase/plugin-acl/dist/server/middlewares/check-change-with-association.js:135:3)\n at async middleware (/home/dr/nocobase/node_modules/@nocobase/plugin-workflow-request-interceptor/dist/server/RequestInterceptionTrigger.js:176:5)\n at async triggerWorkflowActionMiddleware (/home/dr/nocobase/node_modules/@nocobase/plugin-workflow-action-trigger/dist/server/ActionTrigger.js:61:7)\n at async dataTemplate (/home/dr/nocobase/node_modules/@nocobase/server/lib/middlewares/data-template.js:36:3)\n at async blockChinaRegionList (/home/dr/nocobase/node_modules/@nocobase/plugin-field-china-region/dist/server/index.js:57:9)\n at async app.acl.use.after (/home/dr/nocobase/node_modules/@nocobase/plugin-acl/dist/server/server.js:563:9)”} module=xunhd submodule=create method=error-handler app=main reqId=d6c2ade9-081c-47e1-bbb8-a387764b7198 dataSourceKey=main
Jun 03 10:43:16 nocobase-ap yarn[90458]: 2026-06-03 10:43:16 [error] response /api/xunhd:create method=POST path=/api/xunhd:create res=[{“message”:“null value in column "lifnr" of relation "t_lfa1" violates not-null constraint”}] action={“actionName”:“create”,“resourceName”:“xunhd”,“params”:{“resourceName”:“xunhd”,“actionName”:“create”,“values”:{“linfr”:“SUP000629”,“remak”:“2wsde”,“xnent”:“2026-06-04T06:00:00.000Z”,“xnsta”:“2026-06-03T00:00:00.000Z”,“xunds”:“wser”},“whitelist”:[“chwea”,“createdAt”,“createdBy”,“createdById”,“decye”,“demet”,“frxnsta”,“id”,“linfr”,“payme”,“remak”,“statu”,“updatedAt”,“updatedBy”,“updatedById”,“warra”,“xnent”,“xnsta”,“xunds”,“xunid”]}} userId=9 username=02534 status=500 cost=21 app=main reqId=d6c2ade9-081c-47e1-bbb8-a387764b7198 bodySize=109
Jun 03 10:43:38 nocobase-ap yarn[90458]: 2026-06-03 10:43:38 [debug] Running cleanup for completed tasks… module=application app=main reqId=ea51ee7a-f9a3-440c-ae2c-872f44a5ab38 dataSourceKey=main

是否在数据库修改过字段名称标识,在NocoBase数据源数据表上同步结构 ,之后检查关系字段的主外键字段是否在表中存在 ,报错提示字段: linfr lifnr 。