Skip to content

Commit

Permalink
Include filter when fetching attachments for a specific submission
Browse files Browse the repository at this point in the history
  • Loading branch information
WinnyTroy committed Feb 6, 2020
1 parent b638768 commit d658556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onadata/apps/logger/models/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def get_attachment_url(attachment, suffix=None):

def _get_attachments_from_instance(instance):
attachments = []
for a in instance.attachments.all():
for a in instance.attachments.filter(deleted_at__isnull=True):
attachment = dict()
attachment['download_url'] = get_attachment_url(a)
attachment['small_download_url'] = get_attachment_url(a, 'small')
Expand Down

0 comments on commit d658556

Please sign in to comment.