Fix django.db.utils.DataError: value too long for type character varying(100)

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent 4eaeea9243
commit 299151474e
  1. 1
      api/v1/serializers/content.py
  2. 2
      apps/course/models.py

@ -19,7 +19,6 @@ class ContentCreateSerializer(serializers.Serializer):
data = serializers.JSONField()
def to_representation(self, obj):
print(obj)
if isinstance(obj, Image):
return ImageSerializer(obj, context=self.context).to_representation(obj)
elif isinstance(obj, Text):

@ -77,7 +77,7 @@ class Course(models.Model):
def save(self, *args, **kwargs):
if not self.slug:
self.slug = slugify(
self.title[:100],
self.title[:90],
allow_unicode=True
)

Loading…
Cancel
Save