We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fbaf69 commit a72951eCopy full SHA for a72951e
1 file changed
app/Models/Foundation/Summit/Registration/PromoCodes/Traits/SpeakersPromoCodeTrait.php
@@ -306,9 +306,11 @@ public function isEmailSent():bool
306
public function isRedeemed():bool
307
{
308
try {
309
+ if(!$this->owners->count()) return false;
310
+
311
$query = $this->createQuery("SELECT COUNT(e.id) from models\summit\AssignedPromoCodeSpeaker e
312
JOIN e.registration_promo_code pc
- WHERE pc.id = :promo_code_id and e.redeemed is null");
313
+ WHERE pc.id = :promo_code_id AND e.redeemed is null");
314
315
$query->setParameter('promo_code_id', $this->getId());
316
$res = $query->getSingleScalarResult();
0 commit comments