mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-05-17 22:52:46 +00:00
Compare commits
No commits in common. "29d9432ca21669ec53c2a237a1bac787f47b5dd2" and "ec0419a6d793aab5fb8bbb64ac64f0a8ef31ac8e" have entirely different histories.
29d9432ca2
...
ec0419a6d7
@ -262,15 +262,7 @@ class UploadNotesForm(forms.Form):
|
||||
except UnicodeDecodeError:
|
||||
# This is not UTF-8, grrrr
|
||||
content = data.decode('latin1')
|
||||
for delimiter in [',', ';', '\t', '|']:
|
||||
if content.split('\n')[0].count(delimiter) > 1:
|
||||
break
|
||||
else:
|
||||
self.add_error('file',
|
||||
_("Unable to detect the CSV delimiter. Please use a comma-separated file."))
|
||||
return cleaned_data
|
||||
|
||||
csvfile = csv.reader(StringIO(content), delimiter=delimiter)
|
||||
csvfile = csv.reader(StringIO(content))
|
||||
self.process(csvfile, cleaned_data)
|
||||
except UnicodeDecodeError:
|
||||
self.add_error('file', _("This file contains non-UTF-8 and non-ISO-8859-1 content. "
|
||||
|
@ -863,7 +863,7 @@ class PoolDetailView(LoginRequiredMixin, DetailView):
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
|
||||
context["passages"] = PassageTable(self.object.passages.order_by('position').all())
|
||||
context["passages"] = PassageTable(self.object.passages.order_by('id').all())
|
||||
|
||||
if self.object.results_available or self.request.user.registration.is_volunteer:
|
||||
# Hide notes before the end of the turn
|
||||
|
Loading…
x
Reference in New Issue
Block a user