- return instance
-
-
- def apply_data(self, cleaned_data):
- self.value = cleaned_data.get('value', None)
-
- def apply_data(self, cleaned_data):
- if 'value' in cleaned_data and cleaned_data['value'] is not None:
- self.value = cleaned_data['value']
- else:
- self.content_type = cleaned_data.get('content_type', None)
- # If there is no value set in the cleaned data, clear the stored value.
- self.object_id = None
-
- def apply_data(self, cleaned_data):
- if 'value' in cleaned_data and cleaned_data['value'] is not None:
- self.value = cleaned_data['value']
- else:
- self.content_type = cleaned_data.get('content_type', None)
- # If there is no value set in the cleaned data, clear the stored value.
- self.value = []
\ No newline at end of file