Minor cleanup (fix comments)

This commit is contained in:
zandercymatics 2024-11-18 15:33:39 -07:00
parent 5f5bc4f616
commit a2365831ca
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 11 additions and 23 deletions

View file

@ -70,7 +70,7 @@ def format_end_date(end_date):
class BaseExport(BaseModelAnnotation):
"""
A generic class for exporting data which returns a csv file for the given model.
Base class in an inheritance tree of 3.
3rd class in an inheritance tree of 4.
"""
@classmethod
@ -157,6 +157,8 @@ class MemberExport(BaseExport):
@classmethod
def get_model_annotation_dict(cls, request=None, **kwargs):
"""Combines the permissions and invitation model annotations for
the final returned csv export which combines both of these contexts"""
portfolio = request.session.get("portfolio")
if not portfolio:
return {}
@ -230,21 +232,9 @@ class MemberExport(BaseExport):
"Member management": member_perm_display,
"Domain management": len(user_managed_domains) > 0,
"Number of domains": len(user_managed_domains),
# TODO - this doesn't quote enclose with one record
"Domains": managed_domains_as_csv,
}
# "id",
# "first_name",
# "last_name",
# "email_display",
# "last_active",
# "roles",
# "additional_permissions_display",
# "member_display",
# "domain_info",
# "source",
row = [FIELDS.get(column, "") for column in columns]
return row