Commit 1a235d85 authored by Odair Mario's avatar Odair Mario
Browse files

atualiza uploads

parent 55edc0ef
Pipeline #15505 failed with stage
in 60 minutes and 4 seconds
......@@ -9,7 +9,7 @@ from degree.models import Degree
def get_path(instance, filename):
return '{}/{}/{}'.format(instance.course, instance.id, filename)
return '{}/{}/{}'.format(instance.degree, instance.id, filename)
class Submission(models.Model):
......
......@@ -10,7 +10,7 @@ def upload(request):
if request.method == 'POST' and request.FILES['historico'] and request.FILES['matricula']:
submission = Submission.objects.create(author=request.user)
submission.degree = request.user.degree
submission.degree = request.user.educator.degree
fs = FileSystemStorage(location=submission.path())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment