Skip to content

Commit

Permalink
Merge branch 'master' into batch_edit
Browse files Browse the repository at this point in the history
  • Loading branch information
susanodd committed Jul 10, 2024
2 parents f076118 + d50c4a4 commit 89b2833
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions signbank/dictionary/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3998,13 +3998,7 @@ def add_video(self, user, videofile, eaffile, corpus):
"""Add a video to the annotated sentence"""
from signbank.video.models import AnnotatedVideo

if ((isinstance(videofile, File) or videofile.content_type == 'django.core.files.uploadedfile.InMemoryUploadedFile' \
or videofile.content_type == 'django.core.files.uploadedfile.TemporaryUploadedFile')\
and (eaffile.content_type == 'application/octet-stream' or eaffile.content_type == 'django.core.files.uploadedfile.TemporaryUploadedFile'\
or eaffile.content_type == 'django.core.files.uploadedfile.InMemoryUploadedFile')):
annotatedVideo = AnnotatedVideo.objects.create(annotatedsentence=self, videofile=videofile, eaffile=eaffile)
else:
return None
annotatedVideo = AnnotatedVideo.objects.create(annotatedsentence=self, videofile=videofile, eaffile=eaffile)

annotatedVideo.corpus = corpus
annotatedVideo.save()
Expand Down

0 comments on commit 89b2833

Please sign in to comment.