

def formfield(self, **kwargs):
    if (('widget' in kwargs) and isinstance(kwargs['widget'], ForeignKeyRawIdWidget)):
        kwargs['widget'] = MediaFileForeignKeyRawIdWidget(self['widget'])
    return super(MediaFileForeignKey, self).formfield(**kwargs)

dataset/ETHPy150Open feincms/feincms/feincms/module/medialibrary/fields.py MediaFileForeignKey.formfield/VarMisuse@41/60 `kwargs`->`self`