Commits

Lynn Rees committed ed661b8

- fix that

Comments (0)

Files changed (1)

graphalchemy/models/elements.py

     def L(self):
         '''local settings'''
         class_names = self.names
-        metas = dict(
+        return self.M.localize(
+            self,
             # properties to index
             indexed=set(k for k in class_names(indexed=True)),
             # properties indexed for full text search
             escaped=set(k for k in class_names(escaped=True)),
             # model name
             name=selfname(self),
+            # slug field
+            slug_from=next(class_names(slug_from=True), ''),
         )
-        # slug field
-        try:
-            metas['slug_from'] = class_names(slug_from=True)[0]
-        except IndexError:
-            metas['slug_from'] = ''
-        return self.M.localize(self, metas)
 
     def _version(self):
         '''increment current snapshot number of node'''