use federations upload dir in the context while removing federation file
This commit is contained in:
parent
dae66475ba
commit
0b9f32a948
|
@ -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))
|
||||
|
|
Reference in New Issue