We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents be22739 + ba432e1 commit 76d5d5aCopy full SHA for 76d5d5a
1 file changed
partner_programs/admin.py
@@ -75,13 +75,16 @@ def get_export_file(self, partner_program: PartnerProgram):
75
76
response_data = tablib.Dataset(headers=column_names)
77
for profile in profiles:
78
- row = [
79
- profile.user.first_name,
80
- profile.user.last_name,
81
- profile.user.patronymic,
82
- profile.user.email,
83
- str(profile.user.birthday),
84
- ]
+ if profile.user is None:
+ row = [""] * 5
+ else:
+ row = [
+ profile.user.first_name,
+ profile.user.last_name,
+ profile.user.patronymic,
85
+ profile.user.email,
86
+ str(profile.user.birthday),
87
+ ]
88
89
json_data = profile.partner_program_data
90
for key in json_schema:
0 commit comments