Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add polling timestamp to masu sources endpoint #5437

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions koku/masu/api/sources/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class Meta:
setup_complete = serializers.BooleanField()
created_timestamp = serializers.DateTimeField()
data_updated_timestamp = serializers.DateTimeField()
polling_timestamp = serializers.DateTimeField(allow_null=True)
active = serializers.BooleanField()
paused = serializers.BooleanField()
customer = CustomerSerializer()
Expand Down
3 changes: 2 additions & 1 deletion koku/masu/api/sources/test/test_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def setUp(self):
def test_serializer(self):
"""Test the serializer."""
for entry in self.data:
provider = entry.get("provider")
provider: Provider = entry.get("provider")
customer = provider.customer
infrastructure = provider.infrastructure

Expand All @@ -61,6 +61,7 @@ def test_serializer(self):
"setup_complete": provider.setup_complete,
"created_timestamp": provider.created_timestamp,
"data_updated_timestamp": provider.data_updated_timestamp,
"polling_timestamp": provider.polling_timestamp,
"active": provider.active,
"paused": provider.paused,
"customer": validated_customer,
Expand Down
Loading