From a177527e77f79ac306b047465a015308a7b6027d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 1 Jun 2017 09:51:10 +0200 Subject: [PATCH] Project: made has_method() safe for when allowed_methods doesn't exist. --- pillarsdk/projects.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pillarsdk/projects.py b/pillarsdk/projects.py index 4dfd1d1..6863dfd 100644 --- a/pillarsdk/projects.py +++ b/pillarsdk/projects.py @@ -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