]> git.parisson.com Git - teleforma.git/commitdiff
Fix no period
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 13 Nov 2017 14:29:45 +0000 (15:29 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 13 Nov 2017 14:29:45 +0000 (15:29 +0100)
teleforma/models/crfpa.py

index 650ec574ee765acf788db3d2d9560e9ed517872c..46068a5ff1afc8a0747c603d7e643bf47ca585fb 100644 (file)
@@ -110,7 +110,7 @@ class Training(Model):
     available = models.BooleanField(_('available'))
 
     def __unicode__(self):
-        if self.name:
+        if self.name and self.period:
             return ' - '.join([self.name, self.period.name])
         else:
             return self.get_code()