delete item, not application by releated agenda-items
This commit is contained in:
parent
2e498403cb
commit
43e30057b3
@ -112,11 +112,13 @@ class Item(MPTTModel, SlideMixin):
|
|||||||
* view
|
* view
|
||||||
* delete
|
* delete
|
||||||
"""
|
"""
|
||||||
if self.releated_sid:
|
|
||||||
return self.get_releated_slide().get_absolute_url(link)
|
|
||||||
if link == 'view':
|
if link == 'view':
|
||||||
|
if self.releated_sid:
|
||||||
|
return self.get_releated_slide().get_absolute_url(link)
|
||||||
return reverse('item_view', args=[str(self.id)])
|
return reverse('item_view', args=[str(self.id)])
|
||||||
if link == 'edit':
|
if link == 'edit':
|
||||||
|
if self.releated_sid:
|
||||||
|
return self.get_releated_slide().get_absolute_url(link)
|
||||||
return reverse('item_edit', args=[str(self.id)])
|
return reverse('item_edit', args=[str(self.id)])
|
||||||
if link == 'delete':
|
if link == 'delete':
|
||||||
return reverse('item_delete', args=[str(self.id)])
|
return reverse('item_delete', args=[str(self.id)])
|
||||||
|
@ -668,7 +668,7 @@ class CreateAgendaItem(RedirectView):
|
|||||||
self.item.save()
|
self.item.save()
|
||||||
|
|
||||||
def get_redirect_url(self, **kwargs):
|
def get_redirect_url(self, **kwargs):
|
||||||
return reverse('item_view', args=[self.item.id])
|
return reverse('item_overview')
|
||||||
|
|
||||||
|
|
||||||
class ApplicationPDF(PDFView):
|
class ApplicationPDF(PDFView):
|
||||||
|
@ -41,7 +41,7 @@ def get_slide_from_sid(sid, element=False):
|
|||||||
if id is not None:
|
if id is not None:
|
||||||
try:
|
try:
|
||||||
object = SLIDE[key].model.objects.get(pk=id)
|
object = SLIDE[key].model.objects.get(pk=id)
|
||||||
except SLIDE[key].DoesNotExist:
|
except SLIDE[key].model.DoesNotExist:
|
||||||
return None
|
return None
|
||||||
if element:
|
if element:
|
||||||
return object
|
return object
|
||||||
|
Loading…
Reference in New Issue
Block a user