From 5a6b972b51216fd1b15800d659a7ecc96b06cd5e Mon Sep 17 00:00:00 2001 From: jorgepastorr Date: Thu, 14 Sep 2023 10:44:02 +0200 Subject: [PATCH] fix last nyapa with target_server on SAS --- orchestra/contrib/saas/forms.py | 1 - orchestra/contrib/systemusers/backends.py | 1 - orchestra/plugins/forms.py | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/orchestra/contrib/saas/forms.py b/orchestra/contrib/saas/forms.py index c21fcf64..a1d9970f 100644 --- a/orchestra/contrib/saas/forms.py +++ b/orchestra/contrib/saas/forms.py @@ -12,7 +12,6 @@ from orchestra.utils.python import random_ascii class SaaSBaseForm(PluginDataForm): site_url = forms.CharField(label=_("Site URL"), widget=SpanWidget(), required=False) - target_server = forms.CharField(required=False, widget=forms.HiddenInput()) class Meta: exclude = ('database',) diff --git a/orchestra/contrib/systemusers/backends.py b/orchestra/contrib/systemusers/backends.py index 132c181b..70b439c0 100644 --- a/orchestra/contrib/systemusers/backends.py +++ b/orchestra/contrib/systemusers/backends.py @@ -700,7 +700,6 @@ class UNIXUserControllerNewServers(ServiceController): def get_groups(self, user): groups = [] if user.is_main: - groups = list(user.account.systemusers.exclude(username=user.username).values_list('username', flat=True)) groups.append("main-systemusers") return groups diff --git a/orchestra/plugins/forms.py b/orchestra/plugins/forms.py index 14f55877..1cbdd84d 100644 --- a/orchestra/plugins/forms.py +++ b/orchestra/plugins/forms.py @@ -25,7 +25,6 @@ class PluginForm(forms.ModelForm): class PluginDataForm(PluginForm): data = forms.CharField(widget=forms.HiddenInput, required=False) - target_server = forms.ModelChoiceField(queryset=Server.objects.filter(name__in=WEB_SERVERS),) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) @@ -100,6 +99,8 @@ class ExtendedPluginDataForm(PluginDataForm): widget=forms.PasswordInput, help_text=_("Enter the same password as above, for verification.")) + target_server = forms.ModelChoiceField(queryset=Server.objects.filter(name__in=WEB_SERVERS),) + def __init__(self, *args, **kwargs): super(ExtendedPluginDataForm, self).__init__(*args, **kwargs) self.fields['sftpuser'].widget = forms.HiddenInput()