mirror of
https://github.com/pretix/pretix.git
synced 2026-05-17 17:14:04 +00:00
fix flake8
This commit is contained in:
@@ -160,12 +160,12 @@ class ReusableMediaSerializer(I18nAwareModelSerializer):
|
|||||||
ops_noperm.append(lop.id)
|
ops_noperm.append(lop.id)
|
||||||
if ops_noperm:
|
if ops_noperm:
|
||||||
ops = [
|
ops = [
|
||||||
{'id': op['id']} if op['id'] in ops_noperm
|
{'id': op['id']} if op['id'] in ops_noperm
|
||||||
else op
|
else op
|
||||||
for op in ops
|
for op in ops
|
||||||
]
|
]
|
||||||
r['linked_orderpositions'] = ops
|
r['linked_orderpositions'] = ops
|
||||||
|
|
||||||
# add linked_orderposition (singular) for backwards compatibility
|
# add linked_orderposition (singular) for backwards compatibility
|
||||||
if len(ops) < 2:
|
if len(ops) < 2:
|
||||||
r['linked_orderposition'] = ops[0] if ops else None
|
r['linked_orderposition'] = ops[0] if ops else None
|
||||||
|
|||||||
Reference in New Issue
Block a user