File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 55from django .utils .text import slugify
66from model_utils .models import TimeStampedModel
77from model_utils .managers import QueryManager
8+ import json
89
910from .mixins import Authorable , Product
1011from ..util .helpers import wave_to_hex
@@ -85,12 +86,11 @@ def to_python(self, value):
8586 raise ValidationError ('Invalid input for spectrum data' )
8687
8788 # def get_db_prep_value(self, value, connection, prepared=False):
88- # print('prep value' )
89+ # print('prep value: ', value )
8990 # return super().get_db_prep_value(np.array(value).tolist(), connection, prepared)
9091
91- # def value_to_string(self, obj):
92- # print('to str')
93- # return super().value_to_string(obj.tolist())
92+ def value_to_string (self , obj ):
93+ return json .dumps (self .value_from_object (obj ))
9494
9595 def validate (self , value , model_instance ):
9696 super ().validate (value , model_instance )
You can’t perform that action at this time.
0 commit comments