code: def patch_refresh_from_db(model):
      
      if not hasattr(model, 'refresh_from_db'):
          return
      old_refresh_from_db = model.refresh_from_db
  
      def new_refresh_from_db(self, using=None, fields=None):
          if fields is not None:
              fields = append_translated(self.__class__, fields)
          return old_refresh_from_db(self, using, fields)
      model.refresh_from_db = new_refresh_from_db
docs: Django >= 1.10: patch refreshing deferred fields. Crucial for only/defer to work.