Skip to content

Commit 3421aab

Browse files
authored
Merge pull request #432 from pythonindia/development
Upgrade django-allauth version and temp fix for report download
2 parents 4a2bd02 + bff3b63 commit 3421aab

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

wye/reports/views.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ def get_tutor_college_poc_csv(request):
105105

106106
@login_required
107107
def get_all_user_info(request):
108-
# if not request.user.is_staff:
109-
# template_name = '403.html'
110-
# return render(request, template_name, {})
111108
users = User.objects.all()
112109
response = HttpResponse(content_type='text/csv')
113110
response['Content-Disposition'] = 'attachment; filename="all_users.csv"'
@@ -117,12 +114,19 @@ def get_all_user_info(request):
117114
'Is Presenter', 'Is POC', 'Is Regional Lead', 'Is Organiser']
118115
writer.writerow(csv_titles)
119116
for obj in users:
120-
row = [
121-
obj.id, obj.first_name, obj.last_name, obj.email, obj.is_active,
122-
Profile.is_presenter(obj),
123-
Profile.is_coordinator(obj),
124-
Profile.is_regional_lead(obj),
125-
Profile.is_organiser(obj)]
117+
try:
118+
row = [
119+
obj.id,
120+
obj.first_name,
121+
obj.last_name,
122+
obj.email,
123+
obj.is_active,
124+
Profile.is_presenter(obj),
125+
Profile.is_coordinator(obj),
126+
Profile.is_regional_lead(obj),
127+
Profile.is_organiser(obj)]
126128

127-
writer.writerow(row)
129+
writer.writerow(row)
130+
except Exception:
131+
pass
128132
return response

0 commit comments

Comments
 (0)