get access key create date for cred report

This commit is contained in:
zscholl 2020-03-11 14:54:58 -05:00
parent 2e91b91294
commit 72bc07f112
2 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@ -22,3 +22,4 @@ tests/file.tmp
.eggs/
.mypy_cache/
*.tmp
.venv/

View File

@ -680,14 +680,14 @@ class User(BaseModel):
access_key_2_last_rotated = "N/A"
elif len(self.access_keys) == 1:
access_key_1_active = "true"
access_key_1_last_rotated = date_created.strftime(date_format)
access_key_1_last_rotated = self.access_keys[0].create_date.strftime(date_format)
access_key_2_active = "false"
access_key_2_last_rotated = "N/A"
else:
access_key_1_active = "true"
access_key_1_last_rotated = date_created.strftime(date_format)
access_key_1_last_rotated = self.access_keys[0].create_date.strftime(date_format)
access_key_2_active = "true"
access_key_2_last_rotated = date_created.strftime(date_format)
access_key_2_last_rotated = self.access_keys[1].create_date.strftime(date_format)
return "{0},{1},{2},{3},{4},{5},not_supported,false,{6},{7},{8},{9},false,N/A,false,N/A".format(
self.name,