Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RecurringRule and OccurringRule model __str__ method #2166

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

saadmk11
Copy link

  1. Django admin raises error on RecurringRule model admin page (change_list). This is caused by the __str__ method.

    Traceback:

    pythondotorg-web-1       |   File "/code/events/models.py", line 287, in __str__
    pythondotorg-web-1       |     return f'{self.event.title} every {timedelta_nice_repr(self.interval)} since {date(self.dt_start.strftime, strftime)}'
    pythondotorg-web-1       |   File "/code/events/utils.py", line 50, in timedelta_nice_repr
    pythondotorg-web-1       |     raise TypeError('First argument must be a timedelta.')
    pythondotorg-web-1       | TypeError: First argument must be a timedelta.
  2. RecurringRule and OccurringRule model admin page (change_list) does not display the expected __str__.

    Expected: Djangocon Europe 2014 05/13/2014 midnight - 05/17/2014 midnight
    Actual: Djangocon Europe 2014 -

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.

None yet

1 participant