Skip to content

Commit

Permalink
Attempt to fix API error
Browse files Browse the repository at this point in the history
Based on server errors, this part of the code seems to be the issue.
  • Loading branch information
madprime committed Dec 22, 2020
1 parent a3ea502 commit 64cb07b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions data_import/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,13 @@ def __str__(self):
return str("{0}:{1}:{2}").format(self.user, self.source, self.file)

def download_url(self, request):
key = self.generate_key(request)
# 20201222 MPB: commenting these out because generate_key is producing "out of range" errors;
# unclear why, but this was an incomplete logging effort we ended up not using.
#
# key = self.generate_key(request)
url = full_url(reverse("data-management:datafile-download", args=(self.id,)))
return "{0}?key={1}".format(url, key)
# return "{0}?key={1}".format(url, key)
return url

@property
def file_url_as_attachment(self):
Expand Down

0 comments on commit 64cb07b

Please sign in to comment.