mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-28 12:03:53 +02:00
Minor cleanup (fix comments)
This commit is contained in:
parent
5f5bc4f616
commit
a2365831ca
2 changed files with 11 additions and 23 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue