thauber / django-schedule

A calendaring app for Django. It is now stable, Please feel free to use it now. Active development has been taken over by bartekgorny.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error on CHECK_OCCURRENCE_PERM_FUNC(occurrence, user)

typonaut opened this issue · comments

When using the supplied sample project I can create new events, but attempting to edit or delete occurrences results in the following error:

'NoneType' object has no attribute 'event'

Which, it turns out is true:

check_occurrence_permission
    return CHECK_EVENT_PERM_FUNC(ob.event, user)

Exception Type: AttributeError at /schedule/occurrence/cancel/10/2022/01/06/09/57/00/
Exception Value: 'NoneType' object has no attribute 'event'
                  
Variable | Value
-- | --
ob | None
user | <SimpleLazyObject: <User: typonaut>>

How to deal with this issue, given that the occurrence object returned is a None?