Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 30f3cb4

Browse filesBrowse files
fix: RecurringRule and OccurringRule model __str__ method (#2166)
* Fix `RecurringRule` and `OccurringRule` model `__str__` method * Update events/models.py * Update events/models.py --------- Co-authored-by: Jacob Coffee <jacob@z7x.org>
1 parent 24ce539 commit 30f3cb4
Copy full SHA for 30f3cb4

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎events/models.py

Copy file name to clipboardExpand all lines: events/models.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class OccurringRule(RuleMixin, models.Model):
237237

238238
def __str__(self):
239239
strftime = settings.SHORT_DATETIME_FORMAT
240-
return f'{self.event.title} {date(self.dt_start.strftime, strftime)} - {date(self.dt_end.strftime, strftime)}'
240+
return f'{self.event.title} {date(self.dt_start, strftime)} - {date(self.dt_end, strftime)}'
241241

242242
@property
243243
def begin(self):
@@ -283,8 +283,8 @@ class RecurringRule(RuleMixin, models.Model):
283283
all_day = models.BooleanField(default=False)
284284

285285
def __str__(self):
286-
strftime = settings.SHORT_DATETIME_FORMAT
287-
return f'{self.event.title} every {timedelta_nice_repr(self.interval)} since {date(self.dt_start.strftime, strftime)}'
286+
return (f'{self.event.title} every {timedelta_nice_repr(self.freq_interval_as_timedelta)} since '
287+
f'{date(self.dt_start, settings.SHORT_DATETIME_FORMAT)}')
288288

289289
def to_rrule(self):
290290
return rrule(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.