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

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

(cherry picked from commit bdb9ee9a)
parent a7c70a8e
No related branches found
No related tags found
1 merge request!201Prepare release 2.0rc3
......@@ -14,6 +14,11 @@ Changed
* Support dates for ``TimePeriod.get_datetime_start`` and ``TimePeriod.get_datetime_end``.
Fixed
~~~~~
* ``Event.__str__`` returned a proxy type instead a string.
`2.0rc2`_ - 2021-08-01
----------
......
......@@ -986,7 +986,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