agency.utils

Functions

handle_empty_p_tags(html) → markupsafe.Markup

emails_for_new_ticket(model, request) → collections.abc.Iterator[email.headerregistry.Address]

Returns an iterator with all the unique email addresses

ticket_groups(agency, groupids) → list[onegov.user.UserGroup]

get_html_paragraph_with_line_breaks(text) → markupsafe.Markup

filter_modified_or_created(query, relate, ...) → sqlalchemy.orm.Query[T]

Module Contents

agency.utils.handle_empty_p_tags(html: markupsafe.Markup) → markupsafe.Markup[source]
agency.utils.emails_for_new_ticket(model: onegov.people.models.Agency | onegov.people.models.Person, request: onegov.agency.request.AgencyRequest) → collections.abc.Iterator[email.headerregistry.Address][source]

Returns an iterator with all the unique email addresses that need to be notified for a new ticket of this type

agency.utils.ticket_groups(agency: onegov.people.models.Agency, groupids: list[str] | None) → list[onegov.user.UserGroup][source]
agency.utils.get_html_paragraph_with_line_breaks(text: object) → markupsafe.Markup[source]
agency.utils.filter_modified_or_created[T](query: sqlalchemy.orm.Query[T], relate: Literal['>', '<', '>=', '<=', '=='], comparison_property: datetime.datetime, collection_class: type[onegov.core.orm.mixins.TimestampMixin]) → sqlalchemy.orm.Query[T][source]