code: def patch_get_deferred_fields(model):
      
      if not hasattr(model, 'get_deferred_fields'):
          return
      old_get_deferred_fields = model.get_deferred_fields
  
      def new_get_deferred_fields(self):
          sup = old_get_deferred_fields(self)
          if hasattr(self, '_fields_were_deferred'):
              sup.update(self._fields_were_deferred)
          return sup
      model.get_deferred_fields = new_get_deferred_fields
docs: Django >= 1.8: patch detecting deferred fields. Crucial for only/defer to work.