diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index ac54899c7..5494d4e3d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -8,6 +8,7 @@ - fixed #12385: UTF-8 characters in Asset title break the Trash - fixed ... and the same problem in the Clipboard - fixed: UpdateAssetSubscribers workflow activity ERRORs if the group cannot be found. + - fixed: EMS has issues showing badges WITHOUT related badge groups. 7.10.26 - fixed: Template diagnostics when called without a session asset. diff --git a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm index 0abfdd874..a12db78a2 100644 --- a/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm +++ b/lib/WebGUI/Asset/Wobject/EventManagementSystem.pm @@ -872,9 +872,11 @@ sub www_addTicketsToBadge { my $badge = WebGUI::Asset->new($session, $assetId, 'WebGUI::Asset::Sku::EMSBadge'); if ( defined $badge ) { my @badgeGroups = split("\n",$badge->get('relatedBadgeGroups')); - %badgeGroups = $db->buildHash( - "SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")", - ); + if (@badgeGroups) { + %badgeGroups = $db->buildHash( + "SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")", + ); + } } } @@ -1909,9 +1911,11 @@ className='WebGUI::Asset::Sku::EMSTicket' and state='published' and revisionDate my $badge = WebGUI::Asset->new($session, $assetId, 'WebGUI::Asset::Sku::EMSBadge'); if ( defined $badge ) { my @badgeGroups = split("\n",$badge->get('relatedBadgeGroups')); - %badgeGroups = $db->buildHash( - "SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")", - ); + if (@badgeGroups) { + %badgeGroups = $db->buildHash( + "SELECT badgeGroupId, ticketsPerBadge FROM EMSBadgeGroup WHERE badgeGroupId IN (" . $db->quoteAndJoin(\@badgeGroups) . ")", + ); + } } }