Code

Ticket #2579: fix_raw_id_admin_m2m.zj.patch

File fix_raw_id_admin_m2m.zj.patch, 420 bytes (added by zakj@…, 8 years ago)

I prefer this patch, which fixes the html2python method of RawIdAdmin.

  • __init__.py

     
    974974 
    975975class RawIdAdminField(CommaSeparatedIntegerField): 
    976976    def html2python(data): 
    977         return data.split(',') 
     977        if data: 
     978            return data.split(',') 
     979        else: 
     980            return [] 
    978981    html2python = staticmethod(html2python) 
    979982 
    980983class XMLLargeTextField(LargeTextField):