File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -879,6 +879,8 @@ class Program {
879879 // Default to published subjects
880880 options . status_id =
881881 typeof options . status_id !== 'undefined' ? options . status_id : 3 ;
882+ options . course_id =
883+ typeof options . course_id !== 'undefined' ? parseInt ( options . course_id ) : null ;
882884 // let query = 'SELECT `clcdc`.`subject`.`id` AS `id`, \
883885 // `clcdc`.`subject`.`title` AS `title`, \
884886 // `clcdc`.`subject`.`intro` AS `intro`, \
@@ -1067,8 +1069,10 @@ class Program {
10671069 params . push ( options . course_id ) ;
10681070 }
10691071 } else {
1070- if ( parseInt ( options . course_id ) !== 0 )
1071- query += 'AND `clcdc`.`module_subject`.`course_id` is null ' ;
1072+ if ( ! isNaN ( options . course_id ) ) {
1073+ if ( parseInt ( options . course_id ) !== 0 )
1074+ query += 'AND `clcdc`.`module_subject`.`course_id` is null ' ;
1075+ }
10721076 }
10731077 if ( options . appId ) {
10741078 query +=
You can’t perform that action at this time.
0 commit comments