dracidoupe / graveyard

Open Source reimplementation of https://www.dracidoupe.cz/
https://nove.dracidoupe.cz/
MIT License
6 stars 4 forks source link

Bad time render in user details #440

Open Almad opened 4 months ago

Almad commented 4 months ago

https://almad.sentry.io/share/issue/849df8150a7b4ec4b84cfe9fdb357ce0/

AttributeError /uzivatel/{user_profile_id}-{nick_slug}/ 'NoneType' object has no attribute 'strftime'

AttributeError: 'NoneType' object has no attribute 'strftime'
  File "django/core/handlers/exception.py", line 35, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 128, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "django/core/handlers/base.py", line 126, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/decorators/http.py", line 40, in inner
    return func(request, *args, **kwargs)
  File "ddcz/views/users.py", line 95, in user_profile
    return render(
  File "django/shortcuts.py", line 36, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "django/template/loader.py", line 62, in render_to_string
    return template.render(context, request)
  File "django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "django/template/base.py", line 175, in render
    return self._render(context)
  File "django/template/base.py", line 167, in _render
    return self.nodelist.render(context)
  File "django/template/base.py", line 943, in render
    bit = node.render_annotated(context)
  File "django/template/base.py", line 910, in render_annotated
    return self.render(context)
  File "django/template/loader_tags.py", line 155, in render
    return compiled_parent._render(context)
  File "django/template/base.py", line 167, in _render
    return self.nodelist.render(context)
  File "django/template/base.py", line 943, in render
    bit = node.render_annotated(context)
  File "django/template/base.py", line 910, in render_annotated
    return self.render(context)
  File "django/template/loader_tags.py", line 67, in render
    result = block.nodelist.render(context)
  File "django/template/base.py", line 943, in render
    bit = node.render_annotated(context)
  File "django/template/base.py", line 910, in render_annotated
    return self.render(context)
  File "django/template/base.py", line 993, in render
    output = self.filter_expression.resolve(context)
  File "django/template/base.py", line 703, in resolve
    new_obj = func(obj, *arg_vals)
  File "ddcz/templatetags/creations.py", line 68, in articleTime
    return datetime.strftime("%-d. %-m. %Y v %-H:%M")