Skip to content

fix: accept strings in footer settings - #1135

Open
Shubham-Padkonde wants to merge 1 commit into
sendgrid:mainfrom
Shubham-Padkonde:fix/footer-string-values
Open

Shubham-Padkonde wants to merge 1 commit into
sendgrid:mainfrom
Shubham-Padkonde:fix/footer-string-values

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Fixes #1083.

Passing strings to FooterSettings(text=..., html=...), or assigning them through its documented setters, currently raises AttributeError when the mail payload is serialized. The setters now wrap raw values in FooterText and FooterHtml, following the other mail helpers. Existing wrapper objects and clearing a property with None remain supported.

Updated the property documentation and mail example. Added five tests covering constructor and setter strings, empty strings, existing wrappers, and clearing values. Three of these tests reproduce the original failure.

Validation: all 114 unit tests pass. The repository's Ruff CI rules, changed-file pycodestyle/pyflakes, and Pylint error checks pass. The Docker-backed API integration suite was not run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_text and _html attributes and methods in FooterSettings do not match

1 participant