code: def get_prep_value(self, value):
          
  
          if isinstance(value, LocalizedValue):
              prep_value = LocalizedValue()
              for k, v in value.__dict__.items():
                  if v is None:
                      prep_value.set(k, '')
                  else:
                      # Need to convert File objects provided via a form to
                      # unicode for database insertion
                      prep_value.set(k, six.text_type(v))
              return super().get_prep_value(prep_value)
          return super().get_prep_value(value)
docs: Returns field's value prepared for saving into a database.