<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def flush_ct_inventory(self):
 """internal method used only if ct_inventory is enabled """

        if hasattr(self, '_ct_inventory'):

            # skip self from update
            self._ct_inventory = None
            self.update_view = False
            self.save()