code: def flush_ct_inventory(self):
          
          if hasattr(self, '_ct_inventory'):
  
              # skip self from update
              self._ct_inventory = None
              self.update_view = False
              self.save()
docs: internal method used only if ct_inventory is enabled