1. Luke Plant
  2. django-piston

Commits

Jesper Nøhr  committed 80086e0

don't assume all methods are set when generating docs

  • Participants
  • Parent commits 660a977
  • Branches default

Comments (0)

Files changed (1)

File piston/doc.py

View file
         
     def get_methods(self, include_default=False):
         for method in "read create update delete".split():
-            met = getattr(self.handler, method)
+            met = getattr(self.handler, method, None)
+
+            if not met:
+                continue
+                
             stale = inspect.getmodule(met) is handler
 
             if not self.handler.is_anonymous: