From 0b9f32a9484f09ec2298297739a112addb8b18f7 Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Tue, 26 May 2015 09:52:28 +0200 Subject: [PATCH] use federations upload dir in the context while removing federation file --- uauth/organization/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uauth/organization/views.py b/uauth/organization/views.py index 93dcda0..79a64e7 100644 --- a/uauth/organization/views.py +++ b/uauth/organization/views.py @@ -294,10 +294,10 @@ class FederationsAdd(UploadMixin, FederationsView): federations_add = FederationsAdd.as_view() -class FederationsDelete(TemplateView): +class FederationsDelete(FederationsView): def get(self, request, *args, **kwargs): ctx = self.get_context_data(**kwargs) - s = request.GET.get('federation') + f = request.GET.get('federation') if os.path.exists(os.path.join(ctx['federations_dir'], f)): try: os.remove(os.path.join(ctx['federations_dir'], f))