mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
Fixed item deletion to also respect deleted orders (which should not
exist)
This commit is contained in:
@@ -908,7 +908,7 @@ class ItemDelete(EventPermissionRequiredMixin, DeleteView):
|
|||||||
return context
|
return context
|
||||||
|
|
||||||
def is_allowed(self) -> bool:
|
def is_allowed(self) -> bool:
|
||||||
return not self.get_object().positions.current.exists()
|
return not self.get_object().positions.exists()
|
||||||
|
|
||||||
def get_object(self, queryset=None) -> Property:
|
def get_object(self, queryset=None) -> Property:
|
||||||
if not hasattr(self, 'object') or not self.object:
|
if not hasattr(self, 'object') or not self.object:
|
||||||
|
|||||||
Reference in New Issue
Block a user