mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
fix count for no sub time slice on day
This commit is contained in:
parent
60207dc361
commit
f4427dcd77
@ -295,6 +295,8 @@ class Poll {
|
||||
foreach ( $this->getChoices() as $choice ) {
|
||||
$boom = explode( ' >>> ', $choice->getName() );
|
||||
|
||||
if(count($boom) ==2){
|
||||
|
||||
|
||||
if ( ! isset( $grouped_dates[ $boom[ 0 ] ] ) ) {
|
||||
|
||||
@ -307,6 +309,7 @@ class Poll {
|
||||
$grouped_dates[ $boom[ 0 ] ][ "choices" ][] = [
|
||||
"choice_id" => $choice->getId(),
|
||||
"name" => $boom[ 1 ] ];
|
||||
}
|
||||
}
|
||||
}
|
||||
$scoreInfos = [
|
||||
|
Loading…
Reference in New Issue
Block a user