Skip to content

Commit

Permalink
Merge pull request #2288 from voxel51/bugfix/v0.16.6-compat
Browse files Browse the repository at this point in the history
Patch v0.16.6 compatibility
  • Loading branch information
brimoor authored Nov 26, 2022
2 parents b3ab6b8 + 9638da5 commit f8ef906
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app/packages/core/src/__generated__/DatasetQuery.graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ type Dataset {
}

type DatasetAppConfig {
mediaFields: [String!]!
mediaFields: [String!]
plugins: JSON
sidebarGroups: [SidebarGroup!]
sidebarMode: SidebarMode
Expand Down
4 changes: 3 additions & 1 deletion fiftyone/core/odm/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,9 @@ class DatasetDocument(Document):
default_group_slice = StringField()
tags = ListField(StringField())
info = DictField()
app_config = EmbeddedDocumentField(DatasetAppConfig)
app_config = EmbeddedDocumentField(
DatasetAppConfig, default=DatasetAppConfig
)
classes = DictField(ClassesField())
default_classes = ClassesField()
mask_targets = DictField(TargetsField())
Expand Down
6 changes: 1 addition & 5 deletions fiftyone/server/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,7 @@ class FFmpegNotFoundException(RuntimeError):
def _create_media_urls(
collection: SampleCollection, sample: t.Dict, cache: t.Dict
) -> t.Dict[str, str]:
media_fields = (
collection.app_config.media_fields
if collection.app_config
else ["filepath"]
)
media_fields = collection.app_config.media_fields
media_urls = []

for field in media_fields:
Expand Down
2 changes: 1 addition & 1 deletion fiftyone/server/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class SidebarMode(Enum):

@gql.type
class DatasetAppConfig:
media_fields: t.List[str]
media_fields: t.Optional[t.List[str]]
plugins: t.Optional[JSON]
sidebar_groups: t.Optional[t.List[SidebarGroup]]
sidebar_mode: t.Optional[SidebarMode]
Expand Down

0 comments on commit f8ef906

Please sign in to comment.