Open fatboystring opened 1 year ago
@fatboystring One check is failing, can you fix it? https://github.com/llazzaro/django-scheduler/actions/runs/5405303603/jobs/9970975750?pr=555
Regards
@llazzaro should be sorted now. Thanks
I don't think this is compatible with #488
Fixes issues #301 and #554
A couple of issues identified with the
OccurrencePreview
view - as follows:OccurrencePreview
class means that theProcessFormView.get
method is called first and foremost.ProcessFormView.get
does not invoke theget_object
method meaning the object is never fetched from the database.model
attribute defined on the view class isOccurrence
. Thepk_url_kwarg
attribute on the view class isoccurrence_id
. The url pattern that this view class is bound to does not define anoccurrence_id
pattern meaning theget_object
method call would fail if the default implementation ofget_object
were usedAs a result of the above, when
get_context_data
is called, theobject
attribute of the view has not been set, resulting in anAttributeError
.The fix involves:
event_id
from the url pattern to fetch the event from the dbPeriod
class to get occurrences for that point in timeThanks for the library. Please let me know if you'd like anything changed in the pull request