Skip to content

Commit

Permalink
fixed tests except weird migration issues. push to see if global or l…
Browse files Browse the repository at this point in the history
…ocal issue
  • Loading branch information
swheaton authored and brimoor committed Sep 12, 2024
1 parent 1c10d5a commit cab2429
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fiftyone/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1457,6 +1457,7 @@ def add_sample_field(
ValueError: if a field of the same name already exists and it is
not compliant with the specified values
"""
created_at = kwargs.pop("created_at", datetime.utcnow())
if embedded_doc_type is not None and issubclass(
embedded_doc_type, fog.Group
):
Expand All @@ -1465,7 +1466,7 @@ def add_sample_field(
description=description,
info=info,
read_only=read_only,
created_at=datetime.utcnow(),
created_at=created_at,
)
else:
expanded = self._sample_doc_cls.add_field(
Expand All @@ -1477,7 +1478,7 @@ def add_sample_field(
description=description,
info=info,
read_only=read_only,
created_at=datetime.utcnow(),
created_at=created_at,
**kwargs,
)

Expand Down Expand Up @@ -1612,6 +1613,7 @@ def add_frame_field(
"Only datasets that contain videos may have frame fields"
)

created_at = kwargs.pop("created_at", datetime.utcnow())
expanded = self._frame_doc_cls.add_field(
field_name,
ftype,
Expand All @@ -1621,7 +1623,7 @@ def add_frame_field(
description=description,
info=info,
read_only=read_only,
created_at=datetime.utcnow(),
created_at=created_at,
**kwargs,
)

Expand Down

0 comments on commit cab2429

Please sign in to comment.