diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2015-02-18 23:25:46 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2015-05-06 15:58:26 +0200 | 
| commit | f63bcf8bb9c8ea83546e0a4f886f321533c1cbfe (patch) | |
| tree | 78a450d36f9095bfe5e2d615755da693ee8e6f58 /ishtar_common/models.py | |
| parent | c8cf444ae57ba6f6f071f900dde7cc899ea21542 (diff) | |
| download | Ishtar-f63bcf8bb9c8ea83546e0a4f886f321533c1cbfe.tar.bz2 Ishtar-f63bcf8bb9c8ea83546e0a4f886f321533c1cbfe.zip  | |
Fix generaltype slug size (to match with label size)
Diffstat (limited to 'ishtar_common/models.py')
| -rw-r--r-- | ishtar_common/models.py | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 358c66572..d5e0e5fc5 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -237,7 +237,7 @@ class GeneralType(models.Model):      """      label = models.CharField(_(u"Label"), max_length=100)      txt_idx = models.CharField(_(u"Textual ID"), -                         validators=[validate_slug], max_length=30, unique=True) +                         validators=[validate_slug], max_length=100, unique=True)      comment = models.TextField(_(u"Comment"), blank=True, null=True)      available = models.BooleanField(_(u"Available"), default=True)      HELP_TEXT = u"" @@ -364,7 +364,7 @@ class GeneralType(models.Model):              self.label = u" ".join(u" ".join(self.txt_idx.split('-')                                                          ).split('_')).title()          if not self.txt_idx: -            self.txt_idx = slugify(self.label) +            self.txt_idx = slugify(self.label)[:100]          # clean old keys          if self.pk:  | 
