Skip to content

Commit 619ffec

Browse files
committed
fix: add missing has_media_upload_with_type/has_not_media_upload_with_type parsing
Change-Id: I33c652fea0557c865f53e3eac06093144fed595e
1 parent 6b21b0d commit 619ffec

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

app/Http/Utils/Filters/FilterParser.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,15 @@ public static function parse($filters, $allowed_fields = [])
118118
}
119119

120120
if (!isset($allowed_fields[$field])) {
121-
throw new FilterParserException(sprintf("filter by field %s is not allowed", $field));
121+
throw new FilterParserException(sprintf("Filter by field %s is not allowed.", $field));
122122
}
123123

124124
if (!is_array($allowed_fields[$field])) {
125-
throw new FilterParserException(sprintf("filter by field %s is not an array", $field));
125+
throw new FilterParserException(sprintf("Filter by field %s is not an array.", $field));
126126
}
127+
127128
if (!in_array($op, $allowed_fields[$field])) {
128-
throw new FilterParserException(sprintf("%s op is not allowed for filter by field %s", $op, $field));
129+
throw new FilterParserException(sprintf("%s op is not allowed for filter by field %s.", $op, $field));
129130
}
130131

131132
$f = self::buildFilter($field, $op, $value, $same_field_op);
@@ -154,7 +155,7 @@ public static function filterExpresion(string $exp)
154155

155156
$op = $matches[0];
156157
$operands = explode($op, $exp, 2);
157-
$field = $operands[0];
158+
$field = strtolower(trim($operands[0]));
158159
$value = $operands[1];
159160
Log::debug(sprintf("FilterParser::filterExpresion field %s op %s value %s", $field, $op, json_encode($value)));
160161
return [$field, $op, $value];

app/Jobs/Emails/PresentationSubmissions/ProcessSpeakersEmailRequestJob.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,14 @@ public function handle
9090
'has_alternate_presentations' => ['=='],
9191
'has_rejected_presentations' => ['=='],
9292
'presentations_track_id' => ['=='],
93-
'presentations_selection_plan_id' => ['=='],
94-
'presentations_type_id' => ['=='],
95-
'presentations_title' => ['=@', '@@', '=='],
96-
'presentations_abstract' => ['=@', '@@', '=='],
93+
'presentations_selection_plan_id' => ['=='],
94+
'presentations_type_id' => ['=='],
95+
'presentations_title' => ['=@', '@@', '=='],
96+
'presentations_abstract' => ['=@', '@@', '=='],
9797
'presentations_submitter_full_name' => ['=@', '@@', '=='],
9898
'presentations_submitter_email' => ['=@', '@@', '=='],
99+
'has_media_upload_with_type' => ['=='],
100+
'has_not_media_upload_with_type' => ['=='],
99101
]) : null;
100102

101103
$service->sendEmails($this->summit_id, $this->payload, $filter);

0 commit comments

Comments
 (0)