Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Přiřazení práce odesílá notifikaci jen vedoucímu #295

Open
thejoeejoee opened this issue Oct 11, 2024 · 0 comments
Open

Přiřazení práce odesílá notifikaci jen vedoucímu #295

thejoeejoee opened this issue Oct 11, 2024 · 0 comments
Labels
bug Something isn't working python Pull requests that update Python code

Comments

@thejoeejoee
Copy link
Member

tu se musí podle role respektovat i email, teď se bere vždy jen supervizor

@classmethod
def on_supervisor_added(cls, thesis: Thesis):
return cls._on_role_added(thesis, _("supervisor"))
@classmethod
def on_opponent_added(cls, thesis: Thesis):
return cls._on_role_added(thesis, _("opponent"))
@classmethod
def _on_role_added(cls, thesis: Thesis, role: str):
with cls._new_message() as email:
email.to_address = cls._build_to_address([thesis.supervisor])
email.subject = cls._build_subject(
_('New thesis as {}: {}').format(role, thesis.title)
)
email.html_content = cls._render_content(
template_name='emails/thesis/thesis_new_role_assigned.html',
thesis=thesis,
role=role,
)

@thejoeejoee thejoeejoee added bug Something isn't working python Pull requests that update Python code labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

1 participant