Skip to content
Snippets Groups Projects
Verified Commit bdb9ee9a authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Force __str__ methods of models to return str types instead of proxy types

parent 20a4e32e
No related branches found
No related tags found
1 merge request!198Resolve "Force __str__ methods to return strings"
Pipeline #33345 passed with warnings
......@@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog`_,
and this project adheres to `Semantic Versioning`_.
Unreleased
----------
Fixed
~~~~~
* ``Event.__str__`` returned a proxy type instead a string.
`2.0rc2`_ - 2021-08-01
----------
......
......@@ -976,7 +976,7 @@ class Event(SchoolTermRelatedExtensibleModel, GroupPropertiesMixin, TeacherPrope
if self.title:
return self.title
else:
return _(f"Event {self.pk}")
return _("Event {pk}").format(pk=self.pk)
@property
def raw_period_from_on_day(self) -> TimePeriod:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment