File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -765,19 +765,19 @@ class about_Admin(ImportExportModelAdmin, admin.ModelAdmin):
765765
766766 @admin .display (description = "roll number" )
767767 def roll_number (self , obj ):
768- return obj .email .roll_no
768+ return obj .email .roll_no if obj . email else ""
769769
770770 @admin .display (description = "name" )
771771 def name (self , obj ):
772- return obj .email .name
772+ return obj .email .name if obj . email else ""
773773
774774 @admin .display (description = "hostel" )
775775 def hostel (self , obj ):
776- return obj .email .hostel
776+ return obj .email .hostel if obj . email else ""
777777
778778 @admin .display (description = "room number" )
779779 def room_number (self , obj ):
780- return obj .email .room_no
780+ return obj .email .room_no if obj . email else ""
781781
782782 actions = ["export_as_csv" , "update_bill" , "fix_all_bills" ]
783783
You can’t perform that action at this time.
0 commit comments