Skip to content

Commit 37aa83b

Browse files
authored
Merge pull request #127 from superannotateai/SAS-3944
SAS-3944 prepare export for video projects
2 parents 8eb16ad + 3e350f6 commit 37aa83b

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

superannotate/db/exports.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@ def prepare_export(
127127
"""
128128
if not isinstance(project, dict):
129129
project = get_project_metadata_bare(project)
130+
if project["type"] == "Video":
131+
if include_fuse or only_pinned:
132+
raise SABaseException(
133+
0,
134+
"The function does not support include fuse and pin arguments "
135+
"for projects containing videos attached with URLs"
136+
)
137+
130138
upload_state = upload_state_int_to_str(project.get("upload_state"))
131139
if upload_state == "External" and include_fuse == True:
132140
logger.info(
@@ -144,11 +152,14 @@ def prepare_export(
144152
current_time = datetime.now().strftime("%b %d %Y %H:%M")
145153
json_req = {
146154
"include": annotation_statuses,
147-
"fuse": int(include_fuse),
148-
"is_pinned": int(only_pinned),
149155
"coco": 0,
150156
"time": current_time
151157
}
158+
if project["type"] != "Video":
159+
json_req["fuse"] = int(include_fuse)
160+
json_req["is_pinned"] = int(only_pinned)
161+
json_req["coco"] = 0
162+
152163
if folder_names is not None:
153164
json_req["folder_names"] = folder_names
154165
params = {'team_id': team_id, 'project_id': project_id}

0 commit comments

Comments
 (0)