Commits

Yohan Boniface committed d79b3ce

Do not fail if an url has no name

Comments (0)

Files changed (1)

leaflet_storage/views.py

     if urls is None:
         # prevent circular import
         from .urls import urlpatterns
-        urls = [url.name for url in urlpatterns if url.name]
+        urls = [url.name for url in urlpatterns if getattr(url, 'name', None)]
     return dict(zip(urls, [get_uri_template(url) for url in urls]))