Skip to content

Commit

Permalink
Merge pull request #537 from bounswe/backend/feature/semantic_search_…
Browse files Browse the repository at this point in the history
…engine-#484

[Backend] Annotation bug fix
  • Loading branch information
mehmetemreakbulut authored Dec 27, 2022
2 parents 8690200 + d7fd541 commit a5bd1f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/backend/annotation/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def delete_all_text_annotations(request, obj_id):
def get_annotations(request, source_id):
author = request.user
source_type = request.GET.get('type')
text_annotations = TextAnnotation.objects.filter(source_type=source_type).filter(source_id=source_id).filter(author = author or author.type == 1)
text_annotations = TextAnnotation.objects.filter(source_type=source_type).filter(source_id=source_id)
text_annotations_response = []
for text_annotation in text_annotations:
text_annotations_response.append(text_annotation_mapper(text_annotation))

image_annotations = ImageAnnotation.objects.filter(source_type=source_type).filter(source_id=source_id).filter(author=author or author.type == 1)
image_annotations = ImageAnnotation.objects.filter(source_type=source_type).filter(source_id=source_id)
image_annotations_response = []
for image_annotation in image_annotations:
image_annotations_response.append(image_annotation_mapper(image_annotation))
Expand Down

0 comments on commit a5bd1f5

Please sign in to comment.