Skip to content

Avoid HTML tags in plain text part of notification emails #872

Avoid HTML tags in plain text part of notification emails

Avoid HTML tags in plain text part of notification emails #872

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / JUnit Test Report failed Jun 17, 2023 in 0s

1114 tests run, 1097 passed, 1 skipped, 16 failed.

Annotations

Check failure on line 1 in TestTaskExecution

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestTaskExecution.test_task_manually_execute

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/test_task.py:53: in test_task_manually_execute
    manually_execute_task(task, processor)
pycroft/lib/task.py:240: in manually_execute_task
    get_task_implementation(task).execute(task)
pycroft/model/session.py:66: in with_transaction
    rv = wrapped(*args, **kwargs)
pycroft/lib/task.py:61: in execute
    self._execute(task, parameters)
pycroft/lib/task.py:126: in _execute
    lib_user.move(
pycroft/model/session.py:66: in with_transaction
    rv = wrapped(*args, **kwargs)
pycroft/lib/user.py:525: in move
    user_send_mail(user, UserMovedInTemplate(), True)
pycroft/lib/user.py:1085: in user_send_mail
    user_send_mails([user], template, soft_fail, use_internal, **kwargs)
pycroft/lib/user.py:1053: in user_send_mails
    plaintext, html = template.render(user=user,
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/user_moved_in.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestMovedInUser

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestMovedInUser.test_move_changes_address

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_dormant_user.py:82: in test_move_changes_address
    move(user, other_room)
tests/lib/user/test_dormant_user.py:70: in move
    lib_user.move(
pycroft/model/session.py:66: in with_transaction
    rv = wrapped(*args, **kwargs)
pycroft/lib/user.py:525: in move
    user_send_mail(user, UserMovedInTemplate(), True)
pycroft/lib/user.py:1085: in user_send_mail
    user_send_mails([user], template, soft_fail, use_internal, **kwargs)
pycroft/lib/user.py:1053: in user_send_mails
    plaintext, html = template.render(user=user,
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/user_moved_in.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestMovedInUser

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestMovedInUser.test_move_keeps_custom_address

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_dormant_user.py:87: in test_move_keeps_custom_address
    move(user, other_room)
tests/lib/user/test_dormant_user.py:70: in move
    lib_user.move(
pycroft/model/session.py:66: in with_transaction
    rv = wrapped(*args, **kwargs)
pycroft/lib/user.py:525: in move
    user_send_mail(user, UserMovedInTemplate(), True)
pycroft/lib/user.py:1085: in user_send_mail
    user_send_mails([user], template, soft_fail, use_internal, **kwargs)
pycroft/lib/user.py:1053: in user_send_mails
    plaintext, html = template.render(user=user,
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/user_moved_in.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestMoveOutImpl

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestMoveOutImpl.test_move_out_bad_params[params0-end_membership]

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_dormant_user.py:139: in test_move_out_bad_params
    task = create_task_and_execute(TaskType.USER_MOVE_OUT, user, params)
tests/lib/user/task_helpers.py:16: in create_task_and_execute
    execute_scheduled_tasks()
../venv/lib/python3.10/site-packages/celery/local.py:188: in __call__
    return self._get_current_object()(*a, **kw)
../venv/lib/python3.10/site-packages/celery/app/task.py:392: in __call__
    return self.run(*args, **kwargs)
pycroft/task.py:164: in execute_scheduled_tasks
    send_template_mails(['[email protected]'], TaskFailedTemplate(), task=task)
pycroft/lib/mail.py:239: in send_template_mails
    body_plain, body_html = template.render(**kwargs)
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/task_failed.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestMoveOutImpl

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestMoveOutImpl.test_move_out_bad_params[params1-comment]

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_dormant_user.py:139: in test_move_out_bad_params
    task = create_task_and_execute(TaskType.USER_MOVE_OUT, user, params)
tests/lib/user/task_helpers.py:16: in create_task_and_execute
    execute_scheduled_tasks()
../venv/lib/python3.10/site-packages/celery/local.py:188: in __call__
    return self._get_current_object()(*a, **kw)
../venv/lib/python3.10/site-packages/celery/app/task.py:392: in __call__
    return self.run(*args, **kwargs)
pycroft/task.py:164: in execute_scheduled_tasks
    send_template_mails(['[email protected]'], TaskFailedTemplate(), task=task)
pycroft/lib/mail.py:239: in send_template_mails
    body_plain, body_html = template.render(**kwargs)
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/task_failed.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in tests/lib/user/test_edits.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_edits.test_correct_new_email

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_edits.py:23: in test_correct_new_email
    lib_user.edit_email(user, new_mail, False, user)
pycroft/model/session.py:66: in with_transaction
    rv = wrapped(*args, **kwargs)
pycroft/lib/user.py:602: in edit_email
    send_confirmation_email(user)
pycroft/model/session.py:66: in with_transaction
    rv = wrapped(*args, **kwargs)
pycroft/lib/user.py:1118: in send_confirmation_email
    user_send_mail(user, UserConfirmEmailTemplate(
pycroft/lib/user.py:1085: in user_send_mail
    user_send_mails([user], template, soft_fail, use_internal, **kwargs)
pycroft/lib/user.py:1053: in user_send_mails
    plaintext, html = template.render(user=user,
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/user_confirm_email.html:3: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestUserMove

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestUserMove.test_moves_into_other_building

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_move.py:74: in test_moves_into_other_building
    lib_user.move(
pycroft/model/session.py:66: in with_transaction
    rv = wrapped(*args, **kwargs)
pycroft/lib/user.py:525: in move
    user_send_mail(user, UserMovedInTemplate(), True)
pycroft/lib/user.py:1085: in user_send_mail
    user_send_mails([user], template, soft_fail, use_internal, **kwargs)
pycroft/lib/user.py:1053: in user_send_mails
    plaintext, html = template.render(user=user,
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/user_moved_in.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestMoveImpl

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestMoveImpl.test_successful_move_execution

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_move.py:114: in test_successful_move_execution
    task = create_task_and_execute(TaskType.USER_MOVE, user, full_params)
tests/lib/user/task_helpers.py:16: in create_task_and_execute
    execute_scheduled_tasks()
../venv/lib/python3.10/site-packages/celery/local.py:188: in __call__
    return self._get_current_object()(*a, **kw)
../venv/lib/python3.10/site-packages/celery/app/task.py:392: in __call__
    return self.run(*args, **kwargs)
pycroft/task.py:164: in execute_scheduled_tasks
    send_template_mails(['[email protected]'], TaskFailedTemplate(), task=task)
pycroft/lib/mail.py:239: in send_template_mails
    body_plain, body_html = template.render(**kwargs)
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/task_failed.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestMoveImpl

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestMoveImpl.test_all_params_required[param_keys0-level]

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_move.py:137: in test_all_params_required
    task = create_task_and_execute(TaskType.USER_MOVE, user, params)
tests/lib/user/task_helpers.py:16: in create_task_and_execute
    execute_scheduled_tasks()
../venv/lib/python3.10/site-packages/celery/local.py:188: in __call__
    return self._get_current_object()(*a, **kw)
../venv/lib/python3.10/site-packages/celery/app/task.py:392: in __call__
    return self.run(*args, **kwargs)
pycroft/task.py:164: in execute_scheduled_tasks
    send_template_mails(['[email protected]'], TaskFailedTemplate(), task=task)
pycroft/lib/mail.py:239: in send_template_mails
    body_plain, body_html = template.render(**kwargs)
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/task_failed.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestMoveImpl

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestMoveImpl.test_all_params_required[param_keys1-building_id]

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_move.py:137: in test_all_params_required
    task = create_task_and_execute(TaskType.USER_MOVE, user, params)
tests/lib/user/task_helpers.py:16: in create_task_and_execute
    execute_scheduled_tasks()
../venv/lib/python3.10/site-packages/celery/local.py:188: in __call__
    return self._get_current_object()(*a, **kw)
../venv/lib/python3.10/site-packages/celery/app/task.py:392: in __call__
    return self.run(*args, **kwargs)
pycroft/task.py:164: in execute_scheduled_tasks
    send_template_mails(['[email protected]'], TaskFailedTemplate(), task=task)
pycroft/lib/mail.py:239: in send_template_mails
    body_plain, body_html = template.render(**kwargs)
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/task_failed.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestMoveImpl

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestMoveImpl.test_all_params_required[param_keys2-room_number]

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_move.py:137: in test_all_params_required
    task = create_task_and_execute(TaskType.USER_MOVE, user, params)
tests/lib/user/task_helpers.py:16: in create_task_and_execute
    execute_scheduled_tasks()
../venv/lib/python3.10/site-packages/celery/local.py:188: in __call__
    return self._get_current_object()(*a, **kw)
../venv/lib/python3.10/site-packages/celery/app/task.py:392: in __call__
    return self.run(*args, **kwargs)
pycroft/task.py:164: in execute_scheduled_tasks
    send_template_mails(['[email protected]'], TaskFailedTemplate(), task=task)
pycroft/lib/mail.py:239: in send_template_mails
    body_plain, body_html = template.render(**kwargs)
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/task_failed.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestUserMoveIn

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestUserMoveIn.test_move_in

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_move_in.py:42: in test_move_in
    lib_user.move_in(
pycroft/model/session.py:66: in with_transaction
    rv = wrapped(*args, **kwargs)
pycroft/lib/user.py:401: in move_in
    user_send_mail(user, UserMovedInTemplate(), True)
pycroft/lib/user.py:1085: in user_send_mail
    user_send_mails([user], template, soft_fail, use_internal, **kwargs)
pycroft/lib/user.py:1053: in user_send_mails
    plaintext, html = template.render(user=user,
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/user_moved_in.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestMoveInImpl

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestMoveInImpl.test_successful_move_in_execution_without_mac

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_move_in.py:90: in test_successful_move_in_execution_without_mac
    task = create_task_and_execute(
tests/lib/user/task_helpers.py:16: in create_task_and_execute
    execute_scheduled_tasks()
../venv/lib/python3.10/site-packages/celery/local.py:188: in __call__
    return self._get_current_object()(*a, **kw)
../venv/lib/python3.10/site-packages/celery/app/task.py:392: in __call__
    return self.run(*args, **kwargs)
pycroft/task.py:164: in execute_scheduled_tasks
    send_template_mails(['[email protected]'], TaskFailedTemplate(), task=task)
pycroft/lib/mail.py:239: in send_template_mails
    body_plain, body_html = template.render(**kwargs)
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/task_failed.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestMoveInImpl

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestMoveInImpl.test_successful_move_in_execution_minimal

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_move_in.py:104: in test_successful_move_in_execution_minimal
    task = create_task_and_execute(
tests/lib/user/task_helpers.py:16: in create_task_and_execute
    execute_scheduled_tasks()
../venv/lib/python3.10/site-packages/celery/local.py:188: in __call__
    return self._get_current_object()(*a, **kw)
../venv/lib/python3.10/site-packages/celery/app/task.py:392: in __call__
    return self.run(*args, **kwargs)
pycroft/task.py:164: in execute_scheduled_tasks
    send_template_mails(['[email protected]'], TaskFailedTemplate(), task=task)
pycroft/lib/mail.py:239: in send_template_mails
    body_plain, body_html = template.render(**kwargs)
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/task_failed.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestUserRoomHistory

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestUserRoomHistory.test_room_history_move

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_room_history.py:36: in test_room_history_move
    move(user, room.building_id, room.level, room.number, processor)
pycroft/model/session.py:66: in with_transaction
    rv = wrapped(*args, **kwargs)
pycroft/lib/user.py:525: in move
    user_send_mail(user, UserMovedInTemplate(), True)
pycroft/lib/user.py:1085: in user_send_mail
    user_send_mails([user], template, soft_fail, use_internal, **kwargs)
pycroft/lib/user.py:1053: in user_send_mails
    plaintext, html = template.render(user=user,
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/user_moved_in.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined

Check failure on line 1 in TestUserRoomHistory

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

TestUserRoomHistory.test_room_history_move_in

jinja2.exceptions.UndefinedError: 'start_pre' is undefined
Raw output
tests/lib/user/test_room_history.py:63: in test_room_history_move_in
    move_in(
pycroft/model/session.py:66: in with_transaction
    rv = wrapped(*args, **kwargs)
pycroft/lib/user.py:401: in move_in
    user_send_mail(user, UserMovedInTemplate(), True)
pycroft/lib/user.py:1085: in user_send_mail
    user_send_mails([user], template, soft_fail, use_internal, **kwargs)
pycroft/lib/user.py:1053: in user_send_mails
    plaintext, html = template.render(user=user,
pycroft/lib/mail.py:64: in render
    plain = template_env.get_template(self.template).render(mode='plain', **self.args, **kwargs)
../venv/lib/python3.10/site-packages/jinja2/environment.py:1301: in render
    self.environment.handle_exception()
../venv/lib/python3.10/site-packages/jinja2/environment.py:936: in handle_exception
    raise rewrite_traceback_stack(source=source)
pycroft/templates/mail/user_moved_in.html:1: in top-level template code
    {{ start_pre(mode) }}
../venv/lib/python3.10/site-packages/jinja2/utils.py:83: in from_obj
    if hasattr(obj, "jinja_pass_arg"):
E   jinja2.exceptions.UndefinedError: 'start_pre' is undefined