ModelSerializer 的唯一性检查会导致 OverflowError 错误,而无法通过字段级验证来避免此错误

作者: jamescooke创建于 2020年1月9日更新于 2026年9月12日

Given a simple Model with a single `IntegerField`, when working with SQLite (I'm running version 3.27 which is officially supported by Django) it is possible to generate an overflow error.

内容来源: encode/django-rest-framework