Skip to content

Data retention email: literal Python concatenation rendered in hashfile-job notification #267

Description

@bandrel

Summary

In _data_retention_cleanup_inner (hashview/scheduler.py:98-104), the email sent when a job is deleted because its hashfile aged out has a broken greeting line. The + str(...) + concatenation sits inside an f-string literal, so it is rendered verbatim instead of interpolating the user's name:

message = dedent(f'''\
    Hello ' + str(user.first_name) + ',

    In accordance to the data retention policy of {retention_period} days,
    ...
''')

Recipients literally receive:

Hello ' + str(user.first_name) + ',

The other two retention emails in the same function (scheduler.py:72, scheduler.py:126) correctly use Hello {user.first_name},.

Expected

Hello {user.first_name},

Cosmetic only — does not affect retention behavior. Good candidate to fix alongside #266.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions