Skip to content
Snippets Groups Projects

Registrace: Notifikovat pouze uživatele, kteří si to přejí

Merged Martin Mareš requested to merge mj/nastaveni-mailu into devel
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 1
1
@@ -236,7 +236,7 @@ def join_notify(c: db.Contest) -> None:
.filter_by(place_id=place.place_id)
.options(joinedload(db.UserRole.user))
.all())
notify = [ur.user for ur in uroles if ur.applies_to(at=place, year=r.year, cat=r.category, seq=r.seq)]
notify = {ur.user for ur in uroles if ur.applies_to(at=place, year=r.year, cat=r.category, seq=r.seq) and ur.user.email_notify}
if notify:
for org in notify:
logger.info(f'Join: Notifikuji orga <{org.email}> pro místo {place.get_code()}')
Loading