mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-11 00:58:32 -05:00
Update the code based on feedback. set Default to enabled, add to documentation how to disable it. Add extra documentation
This commit is contained in:
@@ -78,10 +78,14 @@ class ConnectorConfigCreate(GroupRequiredMixin, CreateView):
|
||||
success_url = reverse_lazy('list_connector_config')
|
||||
|
||||
def form_valid(self, form):
|
||||
if self.request.space.demo or settings.HOSTED:
|
||||
if self.request.space.demo:
|
||||
messages.add_message(self.request, messages.ERROR, _('This feature is not yet available in the hosted version of tandoor!'))
|
||||
return redirect('index')
|
||||
|
||||
if settings.DISABLE_EXTERNAL_CONNECTORS:
|
||||
messages.add_message(self.request, messages.ERROR, _('This feature is not enabled by the server admin!'))
|
||||
return redirect('index')
|
||||
|
||||
obj = form.save(commit=False)
|
||||
obj.token = form.cleaned_data['update_token']
|
||||
obj.created_by = self.request.user
|
||||
|
||||
Reference in New Issue
Block a user