fix not being able to create any dialog announcements
This commit is contained in:
parent
ec62953224
commit
47f44a0d4c
1 changed files with 2 additions and 0 deletions
|
|
@ -72,6 +72,7 @@ export class AnnouncementService {
|
|||
// Check how many active dialog queries already exist, to enforce a limit
|
||||
const query = this.announcementsRepository.createQueryBuilder('announcement');
|
||||
query.andWhere('announcement.isActive = true');
|
||||
query.andWhere('announcement.display = \'dialog\'');
|
||||
const count = await query.getCount();
|
||||
if (count >= 5) {
|
||||
throw new IdentifiableError('c0d15f15-f18e-4a40-bcb1-f310d58204ee', 'Too many dialog announcements.');
|
||||
|
|
@ -136,6 +137,7 @@ export class AnnouncementService {
|
|||
// Check how many active dialog queries already exist, to enforce a limit
|
||||
const query = this.announcementsRepository.createQueryBuilder('announcement');
|
||||
query.andWhere('announcement.isActive = true');
|
||||
query.andWhere('announcement.display = \'dialog\'');
|
||||
const count = await query.getCount();
|
||||
if (count >= 5) {
|
||||
throw new IdentifiableError('c0d15f15-f18e-4a40-bcb1-f310d58204ee', 'Too many dialog announcements.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue