• Ramiro Morales's avatar
    Fixed #13085 -- Don't fail on creation of model with GFK to a model with __len__() returning zero. · 04d9730b
    Ramiro Morales yazdı
    Also, according to the comments on the ticket and its duplicates, added
    tests execising saving an instance of a model with a GFK to:
    
    * An unsaved object -- This actually doesn't generate the same failure
      but another ORM-level exception. The test verifies it's the case.
    
    * An instance of a model with a __nonzero__() method thant returns False
      for it. This doesn't fail because that code path isn't executed.
    
    * An instance of a model with a CharField PK and an empty value for it.
      This doesn't fail.
    04d9730b
Adı
Son kayıt (commit)
Son güncelleme
.tx Loading commit data...
django Loading commit data...
docs Loading commit data...
extras Loading commit data...
scripts Loading commit data...
tests Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.hgignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.rst Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
MANIFEST.in Loading commit data...
README.rst Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...