minor changes

This commit is contained in:
matthewswspence 2024-08-22 15:47:21 -05:00
parent 48901a716d
commit 4026e9be86
No known key found for this signature in database
GPG key ID: FB458202A7852BA4

View file

@ -16,7 +16,7 @@ class Command(BaseCommand, PopulateScriptTemplate):
def update_record(self, record: Domain):
"""Defines how we update the first_ready field"""
# update the first_ready value based on the creation date.
record.first_ready = record.created_at
record.first_ready = record.created_at.date()
logger.info(
f"{TerminalColors.OKCYAN}Updating {record} => first_ready: " f"{record.first_ready}{TerminalColors.OKCYAN}"
@ -24,4 +24,4 @@ class Command(BaseCommand, PopulateScriptTemplate):
# check if a transition domain object for this domain name exists, and if so whether
def should_update(self, record: Domain) -> bool:
return TransitionDomain.objects.filter(domain_name=record.name).exists() and record.first_ready != record.created_at
return TransitionDomain.objects.filter(domain_name=record.name).exists() and record.first_ready != record.created_at.date()