I'm trying to add a new step in the "upload new document" wizard.
I get the following exception:
Code: Select all
wizard_step.py", line 121, in done
force_text(order.pk) for order in cleaned_data['orders']
TypeError: 'Order' object is not iterable
Code: Select all
@classmethod
def done(cls, wizard):
result = {}
cleaned_data = wizard.get_cleaned_data_for_step(cls.name)
if cleaned_data:
result['offers'] = [
force_text(offer.pk) for offer in cleaned_data['offers']
]
return result
Code: Select all
allow_multiple = False
field_name = 'orders'
label = _('Orders')
required = False
widget_attributes = {'class':'select2'}
Since the behaviour is untested, this might be a bug. Could someone please look into it?
I've posted here before opening a bug report on GitLab since I'm not 100% sure this might depend on allow_multiple being set to False.
Thanks!
Best Regards,
Rosario