SmileyChris / django-countries

A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Home Page:https://pypi.python.org/pypi/django-countries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow null=True on a models.CountryField with multiple=True

gabn88 opened this issue · comments

We need a Nullable CountryField with multiple=True due to some required denormalisation in the database in combination with a unique_together (NULL is treated different for unique then '', where there can be multiple NULL values, but only one '').

So instead of storing '', we need to store NULL. This is currently not possible due to an check on the model. Would it be possible to remove this error and make it a warning instead?