Commit 794b1045 authored by Odair M.'s avatar Odair M.
Browse files

atualiza uploads

parent e5d81dcf
......@@ -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