Don not invoke endpoint initialize if method is not allowed
@@ -113,6 +113,7 @@ class BaseEndpoint(mixins.CreateModelMixin,
else:
handler = self.http_method_not_allowed
+ if handler != self.http_method_not_allowed:
# Polyaxon's context initializer
self.initialize_context(request, *args, **kwargs)
