Fix on CFP presentation submission proccess
Change-Id: Ibb1f69d16651e998140f2f5924e11c6abfae480a
This commit is contained in:
parent
aebbcd1bd4
commit
d6dad95b48
@ -290,10 +290,10 @@ class PresentationCategory extends SilverstripeBaseModel
|
||||
* @return Tag|null
|
||||
*/
|
||||
public function getAllowedTagByVal($tag_value){
|
||||
$criteria = Criteria::create();
|
||||
$criteria->where(Criteria::expr()->eq('tag', trim($tag_value)));
|
||||
$res = $this->allowed_tags->matching($criteria)->first();
|
||||
return $res === false ? null : $res;
|
||||
$res = $this->allowed_tags->filter(function($e) use($tag_value){
|
||||
return strtolower(trim($e->getTag())) == strtolower(trim($tag_value));
|
||||
});
|
||||
return $res->count() > 0 ? $res->first() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,7 @@ class OAuth2PresentationSubmissionTest extends ProtectedApiTest
|
||||
'level' => 'N/A',
|
||||
'attendees_expected_learnt' => 'super duper',
|
||||
'type_id' => 171,
|
||||
'track_id' => 248,
|
||||
'track_id' => 262,
|
||||
'attending_media' => true,
|
||||
'links' => ['https://www.google.com'],
|
||||
'extra_questions' => [
|
||||
@ -39,7 +39,8 @@ class OAuth2PresentationSubmissionTest extends ProtectedApiTest
|
||||
'id' => 24,
|
||||
'value' => 'test',
|
||||
]
|
||||
]
|
||||
],
|
||||
'tags' => ['Upstream Development']
|
||||
];
|
||||
|
||||
$headers = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user