mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 09:22:14 +00:00
Fix: Handle NULL created_at (#20015)
* Fix: Handle NULL created_at * pyformat --------- Co-authored-by: ulixius9 <mayursingal9@gmail.com>
This commit is contained in:
parent
e332786de6
commit
b2497fb36e
@ -101,15 +101,19 @@ class LifeCycleQueryMixin:
|
||||
try:
|
||||
life_cycle_data = self.life_cycle_query_dict(query=query).get(entity_name)
|
||||
if life_cycle_data:
|
||||
life_cycle = LifeCycle(
|
||||
created=AccessDetails(
|
||||
timestamp=Timestamp(
|
||||
datetime_to_timestamp(
|
||||
if life_cycle_data.created_at:
|
||||
timestamp_value = datetime_to_timestamp(
|
||||
life_cycle_data.created_at, milliseconds=True
|
||||
)
|
||||
else:
|
||||
timestamp_value = datetime_to_timestamp(
|
||||
datetime.min, milliseconds=True
|
||||
) # Using minimum date
|
||||
|
||||
life_cycle = LifeCycle(
|
||||
created=AccessDetails(timestamp=Timestamp(timestamp_value))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
yield Either(
|
||||
right=OMetaLifeCycleData(
|
||||
entity=entity, entity_fqn=entity_fqn, life_cycle=life_cycle
|
||||
|
Loading…
x
Reference in New Issue
Block a user