forked from Fediversity/Fediversity
Remove trailing whitespace
This commit is contained in:
parent
624e354da5
commit
d32e11389c
1 changed files with 9 additions and 6 deletions
|
@ -36,7 +36,7 @@ class ConfigurationForm(LoginRequiredMixin, UpdateView):
|
|||
def get_object(self, queryset=None):
|
||||
obj, created = Configuration.objects.get_or_create(
|
||||
operator=self.request.user)
|
||||
|
||||
|
||||
return obj
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
|
@ -50,14 +50,17 @@ class ConfigurationForm(LoginRequiredMixin, UpdateView):
|
|||
})
|
||||
|
||||
return context
|
||||
|
||||
|
||||
def form_valid(self, form):
|
||||
response = super().form_valid(form) # Save main Configuration form
|
||||
obj = self.get_object() # Get instance
|
||||
|
||||
# Save related forms
|
||||
MastodonConfigForm(self.request.POST, instance=obj.mastodonconfig).save()
|
||||
PixelfedConfigForm(self.request.POST, instance=obj.pixelfedconfig).save()
|
||||
PeertubeConfigForm(self.request.POST, instance=obj.peertubeconfig).save()
|
||||
MastodonConfigForm(self.request.POST,
|
||||
instance=obj.mastodonconfig).save()
|
||||
PixelfedConfigForm(self.request.POST,
|
||||
instance=obj.pixelfedconfig).save()
|
||||
PeertubeConfigForm(self.request.POST,
|
||||
instance=obj.peertubeconfig).save()
|
||||
|
||||
return response
|
||||
return response
|
||||
|
|
Loading…
Add table
Reference in a new issue