Skip to content

Commit

Permalink
1035: add deleted check for administrators
Browse files Browse the repository at this point in the history
  • Loading branch information
f1sh1918 committed Jun 29, 2023
1 parent af8365f commit 44e3bb8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ object AdministratorsRepository {
fun getNotificationRecipientsForApplication(project: String, regionId: Int): List<AdministratorEntity> =
transaction {
(Administrators innerJoin Projects).select {
(Projects.project eq project) and (Administrators.notificationOnApplication eq true) and (Administrators.regionId eq regionId)
(Projects.project eq project) and (Administrators.notificationOnApplication eq true) and (Administrators.regionId eq regionId) and (Administrators.deleted eq false)
}.let { AdministratorEntity.wrapRows(it) }.toList()
}

fun getNotificationRecipientsForVerification(project: String, regionId: Int): List<AdministratorEntity> =
transaction {
(Administrators innerJoin Projects).select {
(Projects.project eq project) and (Administrators.notificationOnVerification eq true) and (Administrators.regionId eq regionId)
(Projects.project eq project) and (Administrators.notificationOnVerification eq true) and (Administrators.regionId eq regionId) and (Administrators.deleted eq false)
}.let { AdministratorEntity.wrapRows(it) }.toList()
}
}

0 comments on commit 44e3bb8

Please sign in to comment.