mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-23 01:51:08 +00:00
Python formatting
This commit is contained in:
parent
a907dfdce7
commit
822e2e1a93
2 changed files with 4 additions and 5 deletions
|
@ -145,11 +145,12 @@ class FederationViews(TestCase):
|
|||
|
||||
view = views.ImportServerBlocklist.as_view()
|
||||
request = self.factory.post(
|
||||
"", {
|
||||
"",
|
||||
{
|
||||
"json_file": SimpleUploadedFile(
|
||||
"file.json", open("file.json", "rb").read()
|
||||
)
|
||||
}
|
||||
},
|
||||
)
|
||||
request.user = self.local_user
|
||||
request.user.is_superuser = True
|
||||
|
|
|
@ -79,9 +79,7 @@ class ImportServerBlocklist(View):
|
|||
|
||||
def post(self, request):
|
||||
""" add a server from the admin panel """
|
||||
json_data = json.load(
|
||||
request.FILES["json_file"]
|
||||
)
|
||||
json_data = json.load(request.FILES["json_file"])
|
||||
failed = []
|
||||
success_count = 0
|
||||
for item in json_data:
|
||||
|
|
Loading…
Reference in a new issue