Fixing a broken test.

This commit is contained in:
Dan 2021-09-30 10:30:58 -04:00
parent 8a4a53f028
commit e002ffd363
1 changed files with 2 additions and 0 deletions

View File

@ -157,6 +157,8 @@ class FileSchema(Schema):
def get_url(self, obj):
token = 'not_available'
base_url = connexion.request.host_url
if obj.id is None:
return "" # We can't return a url for a file that isn't stored yet.
file_url = url_for("/v1_0.crc_api_file_get_file_data_link", file_id=obj.id)
if hasattr(flask.g, 'user'):
token = flask.g.user.encode_auth_token()