Merge pull request #18986 from paultrudel/pid-null-error-fix
fix: Null pointer exception when parent meeting does not exist
This commit is contained in:
commit
730803cc20
@ -1156,6 +1156,11 @@ public class ParamsProcessorUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean parentMeetingExists(String parentMeetingId) {
|
||||
Meeting meeting = ServiceUtils.findMeetingFromMeetingID(parentMeetingId);
|
||||
return meeting != null;
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
* Setters
|
||||
************************************************/
|
||||
|
@ -127,9 +127,20 @@ class ApiController {
|
||||
return
|
||||
}
|
||||
|
||||
if(params.isBreakout == "true" && !params.parentMeetingID) {
|
||||
invalid("parentMeetingIDMissing", "No parent meeting ID was provided for the breakout room")
|
||||
return
|
||||
Boolean isBreakoutRoom = false
|
||||
if (!StringUtils.isEmpty(params.isBreakout)) {
|
||||
isBreakoutRoom = Boolean.parseBoolean(params.isBreakout)
|
||||
}
|
||||
|
||||
if(isBreakoutRoom) {
|
||||
if(StringUtils.isEmpty(params.parentMeetingID)) {
|
||||
invalid("parentMeetingIDMissing", "No parent meeting ID was provided for the breakout room")
|
||||
return
|
||||
}
|
||||
if(!paramsProcessorUtil.parentMeetingExists(params.parentMeetingID)) {
|
||||
invalid("parentMeetingDoesNotExist", "No parent meeting exists for the breakout room")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure unique TelVoice. Uniqueness is not guaranteed by paramsProcessorUtil.
|
||||
|
Loading…
Reference in New Issue
Block a user