Skip to content

Commit

Permalink
reports: move position of "Org has_api_key" column (#1297)
Browse files Browse the repository at this point in the history
Move the `Org has_api_key` column to the last position.
  • Loading branch information
goneri committed Sep 11, 2024
1 parent 88fad3e commit 812bb98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ansible_ai_connect/users/reports/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,29 @@ def generate(
writer.writerow(
[
"OrgId",
"Org has_api_key",
"UUID",
"First name",
"Last name",
"Organization name",
"Plan name",
"Trial started",
"Trial expired_at",
"Org has_api_key",
]
)
for user in users:
organization = user["organization"]
for plan in user["userplan_set"]:
row_data = [
organization["id"],
organization["has_api_key"],
user["uuid"],
user["given_name"],
user["family_name"],
organization["name"],
plan["plan"]["name"],
plan["created_at"],
plan["expired_at"],
organization["has_api_key"],
]
writer.writerow(row_data)

Expand Down
4 changes: 2 additions & 2 deletions ansible_ai_connect/users/reports/tests/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def tearDown(self):

def get_report_header(self) -> str:
return (
"OrgId,Org has_api_key,UUID,First name,Last name,Organization name,"
"Plan name,Trial started,Trial expired_at"
"OrgId,UUID,First name,Last name,Organization name,"
"Plan name,Trial started,Trial expired_at,Org has_api_key"
)

def get_report_generator(self) -> BaseGenerator:
Expand Down

0 comments on commit 812bb98

Please sign in to comment.