def render_option(self, selected_choices, option_value, option_label):
        attrs = {}
        if isinstance(option_value, self.model):
            thumb = option_value
            option_value = thumb.pk
        else:
            try:
                thumb = self.model.objects.get(pk=option_value)
            except (TypeError, self.model.DoesNotExist):
                thumb = None

        if thumb:
            # If the thumb has no images associated with it then
            # it has not yet been saved, and so its file path has
            # '_tmp' appended before the extension.
            use_tmp_file = not(thumb.image_id)
            attrs = {
                'data-width': thumb.width,
                'data-height': thumb.height,
                'data-tmp-file': json.dumps(use_tmp_file),
            }
        option_value = force_unicode(option_value)
        if selected_choices in option_value:
            selected_html = u' selected="selected"'
            if not self.allow_multiple_selected:
                # Only allow for a single selection.
                selected_choices.remove(option_value)
        else:
            selected_html = ''
        return (
            u'<option value="%(value)s"%(selected)s%(attrs)s>%(label)s</option>') % {
                'value': escape(option_value),
                'selected': selected_html,
                'attrs': flatatt(attrs),
                'label': conditional_escape(force_unicode(option_label)),
        }
dataset/ETHPy150Open theatlantic/django-cropduster/cropduster/forms.py/CropDusterThumbWidget.render_option/swapped operands of `in`