Revert "Let plugins allow/prevent the download of individual tickets in an order (#3836)"

This reverts commit e20edab98f.
This commit is contained in:
Martin Gross
2024-02-02 16:09:42 +01:00
parent a769da62c7
commit 9d115c30d7
11 changed files with 125 additions and 140 deletions

View File

@@ -96,9 +96,6 @@ class BaseTicketOutput:
"""
raise NotImplementedError()
def get_tickets_to_print(self, order):
return order.positions_with_tickets
def generate_order(self, order: Order) -> Tuple[str, str, str]:
"""
This method is the same as order() but should not generate one file per order position
@@ -119,7 +116,7 @@ class BaseTicketOutput:
"""
with tempfile.TemporaryDirectory() as d:
with ZipFile(os.path.join(d, 'tmp.zip'), 'w') as zipf:
for pos in self.get_tickets_to_print(order):
for pos in order.positions_with_tickets:
fname, __, content = self.generate(pos)
zipf.writestr('{}-{}{}'.format(
order.code, pos.positionid, os.path.splitext(fname)[1]