Added more tests
This commit is contained in:
parent
764a4863a2
commit
912f288f67
7 changed files with 183 additions and 7 deletions
|
|
@ -37,10 +37,17 @@ class ArrayField(PhangoField):
|
|||
self.error=True
|
||||
self.txt_error='Sorry, the json array is invalid'
|
||||
|
||||
error=0
|
||||
|
||||
if type(self.field_type).__name__!='ArrayField':
|
||||
for k,v in enumerate(value):
|
||||
|
||||
value[k]=self.field_type.check(v)
|
||||
if self.field_type.error:
|
||||
error+=1
|
||||
|
||||
if error>0:
|
||||
self.error=True
|
||||
|
||||
final_value=json.dumps(value)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue