Fixed product deletion

This commit is contained in:
Raphael Michel
2016-03-03 18:18:54 +01:00
parent 5cdcc62d8a
commit 0dfc570071

View File

@@ -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: