Browse Source

Correction in in datasource, small correction in cbl

prieto 8 years ago
parent
commit
5afd2c4718
2 changed files with 6 additions and 1 deletions
  1. 5
    0
      lodel/plugins/mongodb_datasource/datasource.py
  2. 1
    1
      scripts/cbl.sh

+ 5
- 0
lodel/plugins/mongodb_datasource/datasource.py View File

818
                     mongoval = [ dhdl.cast_type(item) for item in mongoval[1:-1].split(',') ]
818
                     mongoval = [ dhdl.cast_type(item) for item in mongoval[1:-1].split(',') ]
819
                 else:
819
                 else:
820
                     mongoval = [ item for item in mongoval[1:-1].split(',') ]
820
                     mongoval = [ item for item in mongoval[1:-1].split(',') ]
821
+            elif value.startswith('(') and value.endswith(')'):
822
+                if (dhdl.cast_type is not None):
823
+                    mongoval = [ dhdl.cast_type(mongoval[1:-1]) ]
824
+                else:
825
+                    mongoval = [ mongoval[1:-1] ]
821
         elif mongop == 'like':
826
         elif mongop == 'like':
822
             #unescaping \
827
             #unescaping \
823
             mongoval = value.replace('\\\\','\\')
828
             mongoval = value.replace('\\\\','\\')

+ 1
- 1
scripts/cbl.sh View File

161
 			Person)
161
 			Person)
162
 				person_ids=$(fetch_all_ids $1 Person)
162
 				person_ids=$(fetch_all_ids $1 Person)
163
 				section_ids=$(fetch_all_ids $1 Section)
163
 				section_ids=$(fetch_all_ids $1 Section)
164
-				subsection_ids=$(fetch_all_ids $1 Section)
164
+				subsection_ids=$(fetch_all_ids $1 Subsection)
165
 				text_ids=$($cmktemp)
165
 				text_ids=$($cmktemp)
166
 				cat $section_ids $subsection_ids | shuf > $text_ids
166
 				cat $section_ids $subsection_ids | shuf > $text_ids
167
 				for i in $(seq $iteration_count)
167
 				for i in $(seq $iteration_count)

Loading…
Cancel
Save