Revision 5bd27846 cloudcms/models.py

b/cloudcms/models.py
177 177
        except:
178 178
            return None
179 179
        
180
    def get_first_entry(self):
181
        try:
182
            return self.userguideentries.filter(is_active=True)[0]
183
        except:
184
            return None
185
        
180 186
    def __unicode__(self):
181 187
        trans = translations.TranslatedObjectMixin.__unicode__(self)
182 188
        return trans or _('Unnamed category')

Also available in: Unified diff