fabiocaccamo / django-colorfield

:art: color field for django models with a nice color-picker in the admin.
MIT License
632 stars 95 forks source link

Color is always required #51

Closed nelsonCastellanos closed 4 years ago

nelsonCastellanos commented 4 years ago

Hi, Saving a field of type colorField does not allow saving null or blank. Thanks.

color_hex_1 = ColorField() color_hex_2 = ColorField(blank=True, null=True) color_hex_3 = ColorField(blank=True, null=True)

nelsonCastellanos commented 4 years ago

I am solved this with default=None. color_hex_1 = ColorField() color_hex_2 = ColorField(blank=True, null=True, default=None) color_hex_3 = ColorField(blank=True, null=True, default=None)