mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Allow null & blank for PickleField. (#315)
The default behaviour of PickleField was changed from null=True to null=False. This causes issues with fields such as an image_field which will try storing a NULL when unset.
This commit is contained in:
parent
a31d6f195f
commit
5e422cfd54
2 changed files with 20 additions and 1 deletions
|
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 2.1.5 on 2019-01-30 04:04
|
||||
|
||||
from django.db import migrations
|
||||
import picklefield.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('database', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='constance',
|
||||
name='value',
|
||||
field=picklefield.fields.PickledObjectField(blank=True, editable=False, null=True),
|
||||
),
|
||||
]
|
||||
|
|
@ -13,7 +13,7 @@ except ImportError:
|
|||
|
||||
class Constance(models.Model):
|
||||
key = models.CharField(max_length=255, unique=True)
|
||||
value = PickledObjectField()
|
||||
value = PickledObjectField(null=True, blank=True)
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('constance')
|
||||
|
|
|
|||
Loading…
Reference in a new issue