Update upload_network.py script

This commit is contained in:
andrew committed 2023-07-14 21:42:10 -04:00
1 parent 12c81c05dd
commit 353e9e6f3c
3 files changed
+87 -16

No files matched your search

+2 -2
View File
@@ -577,7 +577,7 @@ def network_upload(request, engine, name):
# Save the file locally into /Media/ if we don't already have this file
if not Network.objects.filter(sha256=sha256):
FileSystemStorage().save('%s' % (engine, sha256), netfile)
FileSystemStorage().save('%s' % (sha256), netfile)
# Create the Network object mapping to the saved local file
Network.objects.create(
@@ -585,7 +585,7 @@ def network_upload(request, engine, name):
engine=engine, author=request.user.username)
# Redirect to Engine specific view, to add clarity
return redirect(request, '/networks/%s/' % (engine), status='Uploaded %s for %s' % (engine, name))
return redirect(request, '/networks/%s/' % (engine), status='Uploaded %s for %s' % (name, engine))
def network_default(request, engine, network):