Commit cb5a6e85 authored by Odair M.'s avatar Odair M.

Merge branch '63-leitura-csv-nao-funciona' into 'development'

Resolve "leitura csv não funciona"

Closes #63

See merge request !82
parents b6711131 b82e4274
Pipeline #21231 passed with stage
in 2 minutes and 19 seconds
......@@ -36,8 +36,16 @@ class SubmissionCreate(SuccessMessageMixin, CreateView):
def form_valid(self, form):
# muda nomes dos arquivos
form.instance.historico.name = "historico.xls"
form.instance.matricula.name = "matricula.xls"
if ".csv" in form.instance.historico.name:
form.instance.historico.name = "historico.csv"
else:
form.instance.historico.name = "historico.xls"
if ".csv" in form.instance.matricula.name:
form.instance.matricula.name = "matricula.csv"
else:
form.instance.matricula.name = "matricula.xls"
# adiciona a form.instance.usuario e curso
form.instance.author = self.request.user.educator
degree = Degree.objects.get(code=form.instance.degree.code)
......
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