Fix pagevote and bookmark bug for new objects
This commit is contained in:
parent
36e27321f7
commit
4ceae6d066
7 changed files with 32 additions and 44 deletions
|
@ -71,6 +71,5 @@ def undobookmark_page(request):
|
|||
class BookMarkDetailView(TemplateResponseMixin, SingleObjectMixin, View):
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(BookMarkDetailView, self).get_context_data(**kwargs)
|
||||
queryset = self.object.bookmark
|
||||
context["bookmark"] = queryset.first()
|
||||
context["bookmark"] = self.object.get_or_create_bookmark()
|
||||
return context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue