Project: made has_method() safe for when allowed_methods doesn't exist.

This commit is contained in:
2017-06-01 09:51:10 +02:00
parent 9e2bc8f972
commit a177527e77

View File

@@ -74,9 +74,9 @@ class Project(List, Find, Create, Post, Update, Delete, Replace):
return self.success()
def has_method(self, method):
if method in self.allowed_methods:
return True
return False
if self.allowed_methods is None:
return False
return method in self.allowed_methods
def children(self, api=None):
api = api or self.api