id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 11866 "non-null FK to a CharField primary key fails when key value is the empty string, giving ""[model.fk_col] may not be NULL""" Andrew Badr nobody "Model A has a CharField primary_key. Model B has a ForeignKey field to model A. If an instance of A has a row with an empty-string in the primary key column, no B instance can point to it. Attempting to create such a B instance fails with ""[model.fk_col] may not be NULL"". Repro'd with PG and sqlite3." Bug closed Database layer (models, ORM) 1.1 Normal duplicate Accepted 0 0 0 0 0 0