joint-online-judge / horse

The new generation of JOJ Backend.
https://joint-online-judge.github.io/horse/
MIT License
5 stars 3 forks source link

Create Problem Failed #66

Closed nichujie closed 2 years ago

nichujie commented 2 years ago

创建任意Problem出现以下错误:

{
  "errorCode": "IntegrityError",
  "errorMsg": "(sqlalchemy.dialects.postgresql.asyncpg.IntegrityError) <class 'asyncpg.exceptions.NotNullViolationError'>: null value in column \"data_version\" of relation \"problems\" violates not-null constraint\nDETAIL:  Failing row contains (2021-11-22 21:48:17.791268+00, 2021-11-22 21:48:17.791268+00, b7de6f41-cad7-4d82-94b2-7ce069a973ce, 86ddda8b-683a-45f5-bdc0-64f2feaec309, 20186bdd-bf71-47ef-8bb5-c1ce7db10fd7, a4b7d9b7-fa2e-427c-bcc5-daa51bc9a759, test, test, , f, 0, 0, null, null).\n[SQL: INSERT INTO problems (domain_id, owner_id, problem_group_id, id, url, title, content, hidden, num_submit, num_accept) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)]\n[parameters: (UUID('b7de6f41-cad7-4d82-94b2-7ce069a973ce'), UUID('86ddda8b-683a-45f5-bdc0-64f2feaec309'), UUID('20186bdd-bf71-47ef-8bb5-c1ce7db10fd7'), UUID('a4b7d9b7-fa2e-427c-bcc5-daa51bc9a759'), 'test', 'test', '', False, 0, 0)]\n(Background on this error at: https://sqlalche.me/e/14/gkpj)",
  "data": null
}

相关API:

POST http://nichujie.xyz/api/v1/domains/test/problems
BoYanZh commented 2 years ago

Fixed in eca1ae92.