Skip to content

Commit 9e83b4e

Browse files
committed
fix loaddata users
1 parent a920f72 commit 9e83b4e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

users/admin.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ def get_export_users_emails(self, users):
234234

235235
for baby in little_mans:
236236
projects_names = [
237-
collab.project.industry.name for collab in baby.collaborations.all()
237+
collab.project.industry.name if collab.project.industry else ""
238+
for collab in baby.collaborations.all()
238239
]
239240
response_data.append(
240241
[
@@ -248,7 +249,8 @@ def get_export_users_emails(self, users):
248249

249250
for big_man in big_mans:
250251
projects_names = [
251-
collab.project.industry.name for collab in big_man.collaborations.all()
252+
collab.project.industry.name if collab.project.industry else ""
253+
for collab in big_man.collaborations.all()
252254
]
253255
response_data.append(
254256
[

0 commit comments

Comments
 (0)