Ticket #11521: fkeyassignbyid.patch

File fkeyassignbyid.patch, 608 bytes (added by Adys, 6 years ago)

Add attname to field cache

  • django/db/models/options.py

     
    329329            cache[f.name] = (f, model, True, True)
    330330        for f, model in self.get_fields_with_model():
    331331            cache[f.name] = (f, model, True, False)
     332            if f.attname != f.name:
     333                cache[f.attname] = (f, model, True, False)
    332334        if self.order_with_respect_to:
    333335            cache['_order'] = OrderWrt(), None, True, False
    334336        if app_cache_ready():
Back to Top