mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fixed product deletion
This commit is contained in:
@@ -627,7 +627,7 @@ class ItemDelete(EventPermissionRequiredMixin, DeleteView):
|
||||
return context
|
||||
|
||||
def is_allowed(self) -> bool:
|
||||
return not self.get_object().positions.exists()
|
||||
return not self.get_object().orderposition_set.exists()
|
||||
|
||||
def get_object(self, queryset=None) -> Item:
|
||||
if not hasattr(self, 'object') or not self.object:
|
||||
|
||||
Reference in New Issue
Block a user